Description Usage Arguments Examples
Return matrices containg the endogenous, exogenous and group index corresponding to each penlized link. Take care of categorical variables.
1 | initGroup.lvm(x, links, group)
|
x |
a |
links |
the name of the penalized links |
group |
define the groups of the penalty |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## no category
m <- lvm(Y~X1+X2+X3)
dt <- initGroup.lvm(m, links = c("Y~X1","Y~X2"))
dt
## categories
categorical(m, labels = c("A","B","C")) <- "X1"
dt <- initGroup.lvm(m, links = c("Y~X1","Y~X2"))
dt
categorical(m, K=2, labels = 1:2) <- "X2"
dt <- initGroup.lvm(m, links = c("Y~X1","Y~X2"))
dt
regression(m) <- Z~X1+X3+X5+eta
latent(m) <- ~eta
dt <- initGroup.lvm(m, links = c("Y~X1","Y~X2","Z~X1"))
dt
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.