n.param: computes the number of parameters of a model

Description Usage Arguments Value See Also Examples

View source: R/n.param.R

Description

computes the number of free parameters of a model, depending in the number of classes, the type of parameter optimization and the used of familial dependence, to be used in BIC model selection. This is an internal function not meant to be called by the user.

Usage

1
2
n.param(y, K, trans.const = TRUE, optim.param, 
        optim.probs.indic = c(TRUE, TRUE, TRUE, TRUE), famdep = TRUE)

Arguments

y

a matrix of measurements,

K

an integer, the number of latent classes of a candiate model,

trans.const

a logical variable indicating if the parental constraint is used. Parental constraint means that the class of a subject can be only one of his parents classes. Default is TRUE,

optim.param

a function used for parameter optimization, see lca.model for more details,

optim.probs.indic

a vector of logical values indicating which probability parameters to be updated, see lca.model for more details,

famdep

a logical variable indicating if familial dependence model is used or not. Default is TRUE.

Value

The function returns the number of free parameters (of the measurement distribution and the probabilities of the latent classes).

See Also

See also model.select.

Examples

1
2
3
4
data(ped.cont)
y <- ped.cont[,7:ncol(ped.cont)]
n.param(y,K=3,trans.const=TRUE,optim.indep.norm, 
        optim.probs.indic=c(TRUE,TRUE,TRUE,TRUE),famdep=TRUE)

abureau/LCAextend documentation built on May 3, 2019, 9:41 p.m.