getIvar.lvm: Extract the variables related to each parameter

Description Usage Arguments Examples

Description

Extract the variables related to each parameter

Usage

1
2
getIvar.lvm(x, link = NULL, data = NULL, format = "data.table",
  rm.factice = TRUE)

Arguments

x

a lvm model

link

the links to be analysed. If NULL, all the coefficients from the lvm model are used instead.

data

the dataset that will be used to fit the model. If NULL, a simulated data will be generated from the model.

format

the type of object to output. Can be "data.frame", "data.table", or "matrix".

rm.factice

should links corresponding to factor variables be removed since they will be transformed in external parameters?

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
m <- lvm(Y~X1+X2)
categorical(m, K = 3) <- "X1"
try(getIvar.lvm(m)) # error

categorical(m, K = 3, labels = 1:3) <- "X1"
getIvar.lvm(m)
getIvar.lvm(m, "Y~X1")
getIvar.lvm(m, "X1:0|1")
getIvar.lvm(m, "X1:1|2")
getIvar.lvm(m, c("X1:0|1", "X1:1|2"))
getIvar.lvm(m, c("Y~X1","Y~X2"))
getIvar.lvm(m, c("Y~X2","Y~X1"))

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