Description Usage Arguments Examples
This function allows you to make estimation or sample size determinations for surveys using stratified random sampling.
1 2 3 4 |
y |
The data to be used for estimation. Must be a list with length equal to the number of strata. |
B |
The desired bound on the estimation. Required for sample size determination. |
N |
The total population size. |
n |
The total sample size. |
Ni |
The population size per strata. |
ni |
The sample size per strata. |
pi |
The population proportion per strata. |
sig2 |
The population variance per strata unless equal variance across strata. |
sample.size.det |
Logical statement indicating if the action should be sample size determination. If false, estimation occurs. |
budget |
The budget for sample collection. Can be included in sample size determination. |
ss.det.cost |
A vector pf cost to collect samples in a given strata. Can be included in sample size determination. |
ss.det.a |
A vector of the allocation which indicates the proportion to be collected for each strats. Can be included in sample size determination. |
estimate |
Indicate the desired statistic to be estimated. Options include: mean, total, and proportion. |
alpha |
Significance level. |
1 2 3 4 5 | survsamp.strat(B=50,N=100,
Ni=c(46,54),sig2=c(1,2),
estimate="total",sample.size.det = TRUE)
survsamp.strat(y=list(rnorm(25,5,1),rnorm(25,6,2)),
N=100,n=50,ni=c(25,25),Ni=c(46,54),estimate="mean")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.