View source: R/strata.allocation.R
strata.allocation | R Documentation |
Function to allocate the number of samples to be taken for each strata given the total sample size and the strata.allocation method. The number of allocations returned will be equal to the length of the parameters.
strata.allocation(
Nh,
n,
var,
alloc = c("unif", "prop", "min", "optim"),
C,
cini,
ch
)
Nh |
Vector of population strata sizes. |
n |
Sample size |
var |
Vector of strata variances. |
alloc |
The allocation method to be used. Default is "unif". |
C |
Total study cost. |
cini |
Overhead study cost. |
ch |
Vector of costs to take an individual from a strata for the sample. |
alloc="optim" is the only that requires cost function data. Total study and overhead study costs are optional. If given allocation will be done so total study cost is not surpassed.s
Vector of strata sample sizes.
strata.allocation(Nh=rep(125,4), n=100, alloc="unif") #25, 25, 25, 25
strata.allocation(Nh=c(100, 50, 25), n=100, alloc="prop")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.