forked from CenterForAssessment/cfaTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrapSRS.Rd
executable file
·58 lines (51 loc) · 1.74 KB
/
bootstrapSRS.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
\name{bootstrapSRS}
\alias{bootstrapSRS}
\title{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{
\item{summary_variable}{
}
\item{strata_variable}{
}
\item{population_strata_proportions}{
}
\item{sample_size}{
}
\item{bootstrap_iterations}{
}
\item{summary_statistic}{
}
\item{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{Damian W. Betebenner \email{[email protected]} }
\examples{
\dontrun{
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)
}
}
\keyword{ misc }
\keyword{ models }