Description Usage Arguments Examples
This function allows you to make estimation or sample size determinations for surveys using simple random sampling.
1 2 3 |
y |
The data vector to be used for estimation. |
B |
The desired bound on the estimation. Required for sample size determination. |
N |
The population size. Required. |
p |
The population proportion. |
sig2 |
The population variance. |
sample.size.det |
Logical statement indicating if the action should be sample size determination. If false, estimation occurs. |
estimate |
Indicate the desired statistic to be estimated. Options include: mean, total, and proportion. |
systematic |
Logical statement indicating if a systematic sample of a randomly ordered population is to occur. This results in a k value computed in the sample size determination. |
alpha |
Significance level. |
1 2 3 4 5 | survsamp.srs(B=.1,N=100,p=.75,
sample.size.det = TRUE,estimate="proportion")
survsamp.srs(y=rnorm(50,5,2),N=100)#,sig2=1)
survsamp.srs(B=75,N=100,sig2=1,estimate="total",
sample.size.det = TRUE,systematic=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.