Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intercept

Fix mean parameters in 'lvm'-object


Description

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

Usage

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

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).

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(Y_1|X) = α_1 + β_1 X

E(Y_2|X) = α_2 + β_2 X

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 Y_1 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.

Value

A lvm-object

Note

Variables will be added to the model if not already present.

Author(s)

Klaus K. Holst

See Also

Examples

## 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)

lava

Latent Variable Models

v1.6.10
GPL-3
Authors
Klaus K. Holst [aut, cre], Brice Ozenne [ctb], Thomas Gerds [ctb]
Initial release
2021-09-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.