Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


lava (version 1.8.0)

intercept: Fix mean parameters in 'lvm'-object

Description

Define linear constraints on intercept parameters in a lvm-object.

Usage

# S3 method for lvm
intercept(object, vars, ...) <- value

Value

A lvm-object

Arguments

object

lvm-object

...

Additional arguments

vars

character vector of variable names

value

Vector (or list) of parameter values or labels (numeric or character) or a formula defining the linear constraints (see also the regression or covariance methods).

Author

Klaus K. Holst

Details

The intercept function is used to specify linear constraints on the intercept parameters of a latent variable model. As an example we look at the multivariate regression model

E(Y1|X)=α1+β1X E(Y2|X)=α2+β2X

defined by the call

m <- lvm(c(y1,y2) ~ x)

To fix α1=α2 we call

intercept(m) <- c(y1,y2) ~ f(mu)

Fixed parameters can be reset by fixing them to NA. For instance to free the parameter restriction of Y1 and at the same time fixing α2=2, we call

intercept(m, ~y1+y2) <- list(NA,2)

Calling intercept with no additional arguments will return the current intercept restrictions of the lvm-object.

See Also

covariance<-, regression<-, constrain<-, parameter<-, latent<-, cancel<-, kill<-

Examples

Run this code


## A multivariate model
m <- lvm(c(y1,y2) ~ f(x1,beta)+x2)
regression(m) <- y3 ~ f(x1,beta)
intercept(m) <- y1 ~ f(mu)
intercept(m, ~y2+y3) <- list(2,"mu")
intercept(m) ## Examine intercepts of model (NA translates to free/unique paramete##r)


Run the code above in your browser using DataLab