weight_aimlmf | R Documentation |
When combining AIM and LMF designs for a single weighted analysis, the process of calculating weights is complicated by the two-stage nature of the LMF design. This calculates a relative weight for each point first based on whether or not it falls inside an LMF segment that was selected for sampling and how many points total fall in any given LMF segment. Those relative weights are then used to calculate combined design weights.
weight_aimlmf(
aim_points,
lmf_points,
aim_idvar,
lmf_idvar,
aim_fatevar = NULL,
observed_fates = NULL,
invalid_fates = NULL,
wgtcats = NULL,
wgtcat_var,
wgtcat_area_var = NULL,
segments = NULL,
segment_var,
segment_prop_var = NULL,
projection = NULL,
verbose = FALSE
)
aim_points |
Data frame or sf points object. The AIM point information, including unique identities in the variable |
lmf_points |
Data frame or sf points object. The LMF point information, including unique identities in the variable |
aim_idvar |
Character string. The name of the variable in |
lmf_idvar |
Character string. The name of the variable in |
aim_fatevar |
Optional character string. The name of the variable in |
observed_fates |
Optional vector of character strings. The strings present in |
invalid_fates |
Optional vector of character strings. The strings present in |
wgtcats |
Data frame or spatial polygons data frame. The information about the weight categories. This must contain the weight category identities in a variable named |
wgtcat_var |
Character string. The name of the variable in |
wgtcat_area_var |
Optional character string. The name of the variable in |
segments |
Optional spatial polygons data frame. The information about the LMF segments, this is only optional if |
segment_var |
Character string. The name of the variable in |
segment_prop_var |
Character string. The name of the variable in |
projection |
Optional CRS object. Used to reproject all spatial data. If |
verbose |
Logical. If |
A list of two data frames: point_weights which contains information for each point that did not have a fate in invalid_fates
and wgtcat_summary which contains information about each weight category.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.