Function for doing brr
1 2 3 4 5 6 7 8 9 10 |
df |
data frame containing all variables used in initial fitting, plus survey variables (strata, PSU, weights) |
fit |
Initial fit on the full data, pass the formula into mgcv::gam |
nbrr |
Number of BRR samples to |
us |
Unique strata identifiers (corresponds to the unique levels of the variable specified by the strata argument) |
uPSU |
Unique PSU identifiers (corresponds to the unique levels of the variable specified by the PSU argument) |
strata |
Character vector of length 1 indicating the variable name for the strata identifier in the data frame used for model fitting |
PSU |
Character vector of length 1 indicating the variable name for the PSU identifier in the data frame used for model fitting |
weights |
Character vector of length 1 indicating the variable name for individuals' survey weights in the data frame used for model fitting |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.