View source: R/weighting_functions.R
kw.wt | R Documentation |
This function computes KW pseudo-weights based on propensity scores that are provided by the user.
kw.wt( p_score.c, p_score.s, svy.wt, h = NULL, mtch_v = NULL, krn = "triang", large = F, rm.s = F )
p_score.c |
Predicted propensity scores for the non-probability sample |
p_score.s |
Predicted propensity scores for the probability sample |
svy.wt |
A vector of survey weights for the probability sample units |
h |
Bandwidth parameter (will be calculated corresponding to kernel function if not specified) |
krn |
Kernel function.
" |
large |
The cohort size is so large that it has to be divided into pieces. Default is |
rm.s |
Remove unmatched survey units or not. Default is |
If there are unmatched survey sample units, the program gives
"The input bandwidth h is too small. Please choose a larger one!"
If rm.s=TRUE
, the program deletes unmatched survey sample units, and gives
a warning "records in the prob sample were not used because of a small bandwidth"
If rm.s=FALSE
, the program evenly distributes weights of unmatched survey sample units
to all non-probability sample units.
A list
pswt
: KW pseudo-weights
delt.svy
: Number of unmatched survey sample units
h
: Bandwidth
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.