n.param: computes the number of parameters of a model
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.
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).
# NOT RUN {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)
# }