rsp_match_profile
compares a supplied respeciate
profile (or similar data set) and a reference set of supplied profiles
and attempts to identify nearest matches on the
basis of similarity.
rsp_match_profile(
rsp,
ref,
matches = 10,
rescale = 5,
min.n = 8,
method = "pd",
test.rsp = FALSE
)
A respeciate
object or similar data.frame
containing
a species profile to be compared with profiles in ref
. If rsp
contains more than one profile, these are averaged (using
rsp_average_profile
), and the average compared.
A respeciate
object, a data.frame
containing a
multiple species profiles, to be used as reference library when identifying
nearest matches for rsp
.
Numeric (default 10), the maximum number of profile matches to report.
Numeric (default 5), the data scaling method to apply before
comparing rsp
and profiles in ref
: options 0 to 5 handled by
rsp_rescale
.
numeric
(default 8), the minimum number of paired
species measurements in two profiles required for a match to be assessed.
See also rsp_cor_species
.
Character (default 'pd'), the similarity measure to use, current options 'pd', the Pearson's Distance (1 - Pearson's correlation coefficient), or 'sid', the Standardized Identity Distance (See References).
Logical (default FALSE). The match process self-tests by adding
rsp
to ref
, which should generate a perfect fit=0 score. Setting
test.rsp
to TRUE
retains this as an extra record.
rsp_match_profile
returns a fit report: a data.frame
of
up to n
fit reports for the nearest matches to rsp
from the
reference profile data set, ref
.
Distance metrics are based on recommendations by Belis et al (2015) and as implemented in Mooibroek et al (2022):
Belis, C.A., Pernigotti, D., Karagulian, F., Pirovano, G., Larsen, B.R., Gerboles, M., Hopke, P.K., 2015. A new methodology to assess the performance and uncertainty of source apportionment models in intercomparison exercises. Atmospheric Environment, 119, 35–44. https://doi.org/10.1016/j.atmosenv.2015.08.002.
Mooibroek, D., Sofowote, U.M. and Hopke, P.K., 2022. Source apportionment of ambient PM10 collected at three sites in an urban-industrial area with multi-time resolution factor analyses. Science of The Total Environment, 850, p.157981. http://dx.doi.org/10.1016/j.scitotenv.2022.157981.