est_tot_from_des_1marg: helper function to estimate ONE marginal total from a survey...

View source: R/est_tot_ref.R

est_tot_from_des_1margR Documentation

helper function to estimate ONE marginal total from a survey design object

Description

helper function to estimate ONE marginal total from a survey design object

Usage

est_tot_from_des_1marg(form_1_term_only, design_refer)

Arguments

form_1_term_only

a formula with only 1 term on the right hand side representing a marginal total

design_refer

a ?survey::design object that contains the survey data used to estimate the marginal total

Value

result is 'tidy' data frame

Examples

dstrat <- svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
est_tot_from_des_1marg(~sch.wide,design_refer=dstrat)
est_tot_from_des_1marg(~both,design_refer=dstrat)
lapply(list(~sch.wide,~both),est_tot_from_des_1marg,design_refer=dstrat)


statsccpr/MultCal2Sim documentation built on Sept. 3, 2022, 12:39 p.m.