- Notifications
You must be signed in to change notification settings - Fork1
Controlled Difference Estimation for Complex Surveys
License
salernos/svycdiff
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Propensity score methods are broadly employed with observational data asa tool to achieve covariate balance, but how to implement them incomplex surveys is less studied – in particular, when the survey weightsdepend on the group variable under comparison.
In this package, we focus on the specific case when sample selectiondepends the comparison groups of interest. We implement identificationformulas to properly estimate theaverage controlled difference (ACD),or under stronger assumptions, thepopulation average treatment effect(ATE) in outcomes between groups, with appropriate weighting for bothcovariate imbalance and generalizability.
This packages also contains the code necessary to reproduce themotivating data analysis in“What’s the weight? Estimating controlledoutcome differences in complex surveys for health disparitiesresearch.” This analysis focuses on data from the National Health andNutrition Examination Survey (NHANES), investigating the interplay ofrace and social determinants of health when our interest lies inestimating racial differences in mean telomere length.
You can install the development version of svycdiff like so:
#--- CRAN Versioninstall.packages("svycdiff")#--- Development Version# install.packages("devtools")devtools::install_github("salernos/svycdiff")
This is a basic example usage via simulated data:
library(svycdiff)N<-1000dat<- simdat(N)S<- rbinom(N,1,dat$pS)samp<-dat[S==1,]y_mod<-Y~A*X1a_mod<-A~X1s_mod<-pS~A+X1fit<- svycdiff(samp,"DR",a_mod,s_mod,y_mod,"gaussian")fit
Once you havesvycdiff installed, you can type
vignette("svycdiff")inR to bring up a tutorial onsvycdiff and how to use it. To accessthe vignettes in the developer version, please install the package with
devtools::install_github("salernos/svycdiff",build_vignettes=TRUE)
For technical details on the method, see please refer to Salerno etal. (2024+)“What’s the weight? Estimating controlled outcomedifferences in complex surveys for health disparities research.” Toreproduce the analysis results for the main paper, seeinst/nhanes.Rmd. For questions and comments, please contact StephenSalerno (ssalerno@fredhutch.org).
sessionInfo()#> R version 4.4.1 (2024-06-14 ucrt)#> Platform: x86_64-w64-mingw32/x64#> Running under: Windows 11 x64 (build 22631)#>#> Matrix products: default#>#>#> locale:#> [1] LC_COLLATE=English_United States.utf8#> [2] LC_CTYPE=English_United States.utf8#> [3] LC_MONETARY=English_United States.utf8#> [4] LC_NUMERIC=C#> [5] LC_TIME=English_United States.utf8#>#> time zone: America/New_York#> tzcode source: internal#>#> attached base packages:#> [1] stats graphics grDevices utils datasets methods base#>#> loaded via a namespace (and not attached):#> [1] compiler_4.4.1 fastmap_1.2.0 cli_3.6.3 tools_4.4.1#> [5] htmltools_0.5.8.1 rstudioapi_0.17.1 yaml_2.3.10 rmarkdown_2.29#> [9] knitr_1.50 xfun_0.52 digest_0.6.37 rlang_1.1.4#> [13] evaluate_1.0.3
About
Controlled Difference Estimation for Complex Surveys
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
