initGroup.lvm: Reshape information for building the V matrices

Description Usage Arguments Examples

Description

Return matrices containg the endogenous, exogenous and group index corresponding to each penlized link. Take care of categorical variables.

Usage

1
initGroup.lvm(x, links, group)

Arguments

x

a lvm-object

links

the name of the penalized links

group

define the groups of the penalty

Examples

 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

bozenne/lava.penalty documentation built on May 13, 2019, 1:41 a.m.