View source: R/cluster_gen_separate.R
cluster_gen_separate | R Documentation |
This is a sub-function of cluster_gen
that performs cluster sampling, with the twist that each cluster level has its own questionnaire.
cluster_gen_separate(
n_levels,
n,
N,
sum_pop,
calc_weights,
sampling_method,
cluster_labels,
resp_labels,
collapse,
n_X,
n_W,
cat_prop,
c_mean,
sigma,
cor_matrix,
rho,
theta,
whitelist,
verbose,
...
)
n_levels |
number of cluster levels |
n |
numeric vector or list with the number of sampled observations (clusters or subjects) on each level |
N |
population size of each sampled cluster element on each level. Either a numeric vector or a list of numeric vectors. If |
sum_pop |
total population at each level (sampled or not) |
calc_weights |
if |
sampling_method |
can be "SRS" for Simple Random Sampling, "PPS" for Probabilities Proportional to Size, "mixed" to use PPS for schools and SRS otherwise, or a vector with the sampling method for each level |
cluster_labels |
character vector with the names of each cluster level |
resp_labels |
character vector with the names of the questionnaire respondents on each level |
collapse |
if |
n_X |
list of |
n_W |
list of |
cat_prop |
list of cumulative proportions for each item. If |
c_mean |
vector of means for the continuous variables or list of vectors for the continuous variables for each level |
sigma |
vector of standard deviations for the continuous variables or list of vectors for the continuous variables for each level |
cor_matrix |
Correlation matrix between all variables (except weights) |
rho |
intraclass correlation (scalar, vector or list, as appropriate) |
theta |
if |
whitelist |
used when |
verbose |
if |
... |
Additional parameters to be passed to |
cluster_gen()
cluster_gen_together()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.