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

Description Usage Arguments Value See Also Examples

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)


Search within the LCAextend package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.