Usage
sscsample(size, n.samples, sample.type="simple", x = NULL, strata = NULL, cluster = NULL, cl.size = NULL, ret=FALSE)
Arguments
size
the desired size of the sample
n.samples
the number of repeat samples to take
sample.type
the sampling method. Can be one of "simple", "stratified", "cluser" or 1, 2, 3 where 1 corresponds to "simple", 2 to "stratified" and 3 to "cluster"
x
a vector of measurements for each unit in the population. By default x is not used, and the builtin data set sscsample.data is used
strata
a corresponding vector for each unit in the population indicating membership to a stratum
cluster
a corresponding vector for each unit in the population indicating membership to a cluster
cl.size
the number of clusters to sample when using cluster sampling
ret
if true then the samples, their means, and the numbers of observations from each stratum are returned as a list.