init.p.trans: initializes the transition probabilities

Description Usage Arguments Details Value Examples

View source: R/init.p.trans.R

Description

initializes the marginal transition probabilities with or without parental constraint.

Usage

1
init.p.trans(K, trans.const = TRUE)

Arguments

K

number of latent classes,

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.

Details

All non-zero transition probabilities are set to be equal. The parental constraint indicator determines which transition probabilities are non-zero.

Value

the function returns p.trans an array of dimension K times K+1 times K+1: p.trans[c_i,c_1,c_2] is the probability that the subject i is assigned to class c_i and his parents to classes c_1 and c_2.

Examples

1
2
init.p.trans(3) #parental constraint is TRUE,
init.p.trans(3,trans.const=FALSE) #parental constraint is FALSE.

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