getReduce: Extract variables from a reduced latent variable model

Description Usage Arguments Details Examples

Description

Extract variables as in a standard lvm but including or not the variables that compose the linear predictor

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## S3 method for class 'lvm.reduced'
vars(x, lp = TRUE, xlp = FALSE, ...)

## S3 method for class 'lvmfit.reduced'
vars(x, lp = FALSE, xlp = TRUE, ...)

## S3 method for class 'lvm.reduced'
exogenous(x, lp = TRUE, xlp = FALSE, ...)

## S3 method for class 'lvmfit.reduced'
exogenous(x, lp = FALSE, xlp = TRUE, ...)

## S3 method for class 'lvm.reduced'
endogenous(x, top = FALSE, latent = FALSE, ...)

## S3 method for class 'lvmfit.reduced'
endogenous(x, lp = FALSE, xlp = TRUE, ...)

## S3 method for class 'lvm.reduced'
manifest(x, lp = TRUE, xlp = FALSE, ...)

## S3 method for class 'lvmfit.reduced'
manifest(x, lp = FALSE, xlp = TRUE, ...)

Arguments

x

lvm-object

lp

should the name of the linear predictors be returned?

xlp

should the name of the variables that the linear predictors aggregates be returned?

...

additional arguments to be passed to the low level functions

top

for compatibility with endogenous.lvm

latent

logical defining whether latent variables without parents should be included in the result

Details

lp returns all the linear predictors of the lvm-object. The other functions plays the same role as those defined in the lava package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
## regression
m <- lvm.reduced()
m <- regression(m, x=paste0("x",1:10),y="y", reduce = TRUE)
vars(m)
vars(m, lp = TRUE)
vars(m, lp = FALSE, xlp = TRUE)

exogenous(m)
exogenous(m, lp = FALSE)
exogenous(m, xlp = TRUE)

endogenous(m)
endogenous(m, lp = FALSE) # should not change
endogenous(m, xlp = TRUE) # should not change

coef(m)

## lvm
m <- lvm.reduced()
m <- regression(m, x=paste0("x",1:10),y="y1", reduce = TRUE)
m <- regression(m, x=paste0("x",51:150),y="y2", reduce = TRUE)
covariance(m) <- y1~y2

vars(m)
vars(m, lp = FALSE)

exogenous(m)
exogenous(m, lp = FALSE)

endogenous(m)
endogenous(m, lp = FALSE) # should not change

bozenne/lavaReduce documentation built on May 24, 2019, 3:05 a.m.