View source: R/design_cfg_cfa.R
design_cfg_cfa | R Documentation |
Calculates the designmatrix corresponding to a dataset with length(kat)
columns (variables).
design_cfg_cfa( kat, form = paste("~", paste(paste("V", 1:length(kat), sep = ""), collapse = " + ")), ... )
kat |
a numerical vector containing kardinal numbers, giving the number of categories for each variable of a dataset (in the respective order of the variables in such a dataset) which corresponds to the requested designmatrix. So the length of this numerical vector represents the number of variables. |
form |
a character string which can be coerced into a model formulae with the function A special Case is to define a null-model or rather a cfa model of order zero. In such a model no (main) effects are considered. This can be achieved bei passing the character expression |
... |
additional parameters passed through to function |
This function internaly calls the function pos_cfg_cfa
.
For further information on designmatrices see decription on function model.matrix
in the package stats
.
A designmatrix - an object of class c("matrix","design_cfg_cfa")
- for the formula therm given in argumentform
.
No references in the moment
####################################### # designmatrix with three main effects. # three variables with two categories each. design_cfg_cfa(kat=c(2,2,2)) # two variables with two categories each and one variable # with 7 categories (Lienert LSD example). design_cfg_cfa(kat=c(2,2,7)) ########### # designmatrix with three main effects an three interactions. # three variables with two categories each. design_cfg_cfa(kat=c(2,2,2),form="~ V1 + V2 + V3 + V1:V2 + V1:V3 + V2:V3") # two variables with two categories each and one variable # with 7 categories (e.g. The Krauth & Lienert suicide Data). design_cfg_cfa(kat=c(2,2,7),form="~ V1 + V2 + V3 + V1:V2 + V1:V3 + V2:V3") #######################################
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.