bootstrapSRS | R Documentation |
Function for bootstrap summary statistics using data and pre-designated strata proportions.
bootstrapSRS( summary_variable, strata_variable, population_strata_proportions, sample_size=NULL, bootstrap_iterations=100, summary_statistic="mean", return_bootstrap_distribution=FALSE)
summary_variable |
|
strata_variable |
|
population_strata_proportions |
|
sample_size |
|
bootstrap_iterations |
|
summary_statistic |
|
return_bootstrap_distribution |
Function calculates a summary statistic of existing data (e.g., mean) by re-sampling based upon designated strata proportions
Function returns either a list (default) containing the summary statistic (e.g., mean) and standard deviation (i.e., standard error) for the bootstrap sample of that statistic or funtion returns a vector containing the bootstrap replication values.
Damian W. Betebenner dbetebenner@nciea.org
## Not run: bootstrapSRS <- data_table=sgpData_LONG[ CONTENT_AREA=="MATHEMATICS" & GRADE=="5" & YEAR=="2020_2021"][, c("SCALE_SCORE", "ETHNICITY"), with=FALSE], summary_variable="SCALE_SCORE", strata_variable="ETHNICITY", population_strata_proportions= c('African American'=.157, Asian=.054, Hispanic=.261, 'Native American'=.033, White=.495), sample_size=10000, bootstrap_iterations=100, summary_statistic="mean", return_bootstrap_distribution=FALSE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.