Description Usage Arguments Value Examples
This function returns a data.frame with the calculations of time to be spend on sampling process, listing respectives sampling parameters, like confidence levels and margin of errors. Need a sample size function to work.
1 2 |
hh |
The cost, measured in time (HH), for collecting data for each sample unit. |
max.hh |
The cost threshold from which results and their parameters will be excluded. |
max.n |
The sample size threshold from which results and their parameters will be excluded. |
max.alpha |
The maximum z-value of α from which results and their parameters will be excluded. |
max.beta |
The maximum z-value of β from which results and their parameters will be excluded. Applicable only to |
fun |
Function used to calculate samplesize. Can be |
... |
Others parameters passed to be used with the sample size functions. See examples. |
A data.frame with
The α.
The margin of error, when using nSRS or nStrata.
The α, when using nSampleSize.
Respective sample size.
Cost, in time, as the argument passed to the function.
Total cost, in time.
1 2 3 4 5 6 7 | ################### nSRS
nPlan(hh = (10/60), fun = "nSRS", max.alpha = 0.1, max.n = 176, max.hh = 60,
moe = seq(0.01,0.1,by=0.01), pq = 0.25, N = 16548)
################### nPowerSample
nPlan(hh = (5/60), fun = "nPowerSample", max.hh = 40, max.alpha = 0.1, max.beta = 0.2,
p=0.02, p0=0.05, alternative = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.