Description Usage Arguments Details Value Examples
Generate design variables
1 | Gen_design_variables(N, Q, p, K_q = sample(2:p, Q, replace = T))
|
N |
population size |
Q |
Number of design variables |
p |
maximum number of levels for design variables, >=2. |
Generates X, Stratum indicator, computes N_j's and model matrix.
a list of 10 elements. the element named Xd contains one line per individual and gives the value of the stratification variables as well as the stratum number for each individual. The element named vars gives the names of the stratification variables The element named Q gives the number of stratification variables The element named K_q gives for each stratification variable, the number of possible values The element N_j gives the count per stratum The element named Strata is a matrix with one line per stratum and contains the stratum identifier (column "Strata") as well as the corresponding values of the stratification variables.
1 2 | N=1000;Q=2;p=5
XX<-Gen_design_variables(N,Q,p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.