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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fix.R
\name{intercept}
\alias{intercept}
\alias{intercept<-}
\alias{intercept.lvm}
\alias{intercept<-.lvm}
\alias{intfix}
\alias{intfix<-}
\alias{intfix.lvm}
\alias{intfix<-.lvm}
\title{Fix mean parameters in 'lvm'-object}
\usage{
\method{intercept}{lvm}(object, vars, ...) <- value
}
\arguments{
\item{object}{\code{lvm}-object}
\item{\dots}{Additional arguments}
\item{vars}{character vector of variable names}
\item{value}{Vector (or list) of parameter values or labels (numeric or
character) or a formula defining the linear constraints (see also the
\code{regression} or \code{covariance} methods).}
}
\value{
A \code{lvm}-object
}
\description{
Define linear constraints on intercept parameters in a \code{lvm}-object.
}
\details{
The \code{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
\deqn{ E(Y_1|X) = \alpha_1 + \beta_1 X} \deqn{ E(Y_2|X) = \alpha_2 + \beta_2
X}
defined by the call
\code{m <- lvm(c(y1,y2) ~ x)}
To fix \eqn{\alpha_1=\alpha_2} we call
\code{intercept(m) <- c(y1,y2) ~ f(mu)}
Fixed parameters can be reset by fixing them to \code{NA}. For instance to
free the parameter restriction of \eqn{Y_1} and at the same time fixing
\eqn{\alpha_2=2}, we call
\code{intercept(m, ~y1+y2) <- list(NA,2)}
Calling \code{intercept} with no additional arguments will return the
current intercept restrictions of the \code{lvm}-object.
}
\note{
Variables will be added to the model if not already present.
}
\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)
}
\seealso{
\code{\link{covariance<-}}, \code{\link{regression<-}},
\code{\link{constrain<-}}, \code{\link{parameter<-}},
\code{\link{latent<-}}, \code{\link{cancel<-}}, \code{\link{kill<-}}
}
\author{
Klaus K. Holst
}
\keyword{models}
\keyword{regression}
|