doBRR: Function for doing brr

Description Usage Arguments

View source: R/main_fns.R

Description

Function for doing brr

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
doBRR(
  df,
  fit,
  nbrr,
  us = 1:30,
  uPSU = 1:2,
  strata = NULL,
  PSU = NULL,
  weights = NULL
)

Arguments

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


andrew-leroux/surveySoFR documentation built on Feb. 18, 2022, 1:42 a.m.