bootstrapSRS: Bootstrap sampling function for use with pre-designated...

bootstrapSRSR Documentation

Bootstrap sampling function for use with pre-designated strata proportions

Description

Function for bootstrap summary statistics using data and pre-designated strata proportions.

Usage

bootstrapSRS(
        summary_variable,
        strata_variable,
        population_strata_proportions,
        sample_size=NULL,
        bootstrap_iterations=100,
        summary_statistic="mean",
        return_bootstrap_distribution=FALSE)

Arguments

summary_variable
strata_variable
population_strata_proportions
sample_size
bootstrap_iterations
summary_statistic
return_bootstrap_distribution

Details

Function calculates a summary statistic of existing data (e.g., mean) by re-sampling based upon designated strata proportions

Value

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.

Author(s)

Damian W. Betebenner dbetebenner@nciea.org

Examples

	## 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)

CenterForAssessment/cfaTools documentation built on June 2, 2022, 9:23 a.m.