Learn R Programming

confreq (version 1.6.1-1)

df_des_cfa: Degrees of freedom

Description

Calculates the degrees of freedom based on an designmatrix for a (log liniear) CFA model.

Usage

df_des_cfa(des)

Value

An object of class "integer" giving the degrees of freedom for the designmatrix defined in argument des.

Arguments

des

a designmatrix (object of class "matrix") as returned by function design_cfg_cfa.

Details

No details

References

No references in the moment

Examples

Run this code
#######################################
# degrees of freedom for designmatrix with three main effects.
# three variables with two categories each.
df_des_cfa(design_cfg_cfa(kat=c(2,2,2)))
# two variables with two categories each and one variable
# with 7 categories (e.g. The Krauth & Lienert suicide Data).
df_des_cfa(design_cfg_cfa(kat=c(2,2,7)))
###########
# degrees of freedom for designmatrix with three main effects
# and three 'two by two'interactions.
# and tripple interaction --> saturated model --> df=0
# three variables with two categories each.
df_des_cfa(design_cfg_cfa(kat=c(2,2,2),form="~ V1 + V2 + V3 + V1:V2 + V1:V3 + V2:V3 + V1:V2:V3"))
####################################### 

Run the code above in your browser using DataLab