\encoding{UTF-8}
\name{eiv}
\alias{eiv}

\title{Errors-in-Variables Rotation}
\usage{
    eiv(L, identity = seq(NCOL(L)), ...)
}
\arguments{
    \item{L}{a factor loading matrix.}
    \item{identity}{integer vector indicating which rows of the loading
         matrix should form an identity matrix. Default uses the first
         \eqn{k}{k} rows. If inverting the submatrix indicated by
         \code{identity} fails, a different choice of rows must be
         supplied.}
    \item{...}{additional arguments discarded.}
}
\value{
  A \code{GPArotation} object which is a list with elements:
  \item{loadings}{The rotated loadings matrix.}
  \item{Th}{The rotation matrix.}
  \item{method}{A string indicating the rotation method (\code{"eiv"}).}
  \item{orthogonal}{Always \code{FALSE} (oblique rotation).}
  \item{convergence}{Always \code{TRUE} (the optimization is not iterative).}
  \item{Phi}{The covariance matrix of the rotated factors.}
}
\description{
  Rotates a factor loading matrix to an errors-in-variables representation.
}
\details{
  The loading matrix is rotated so that the \eqn{k}{k} rows indicated by
  \code{identity} form an identity matrix, with the remaining
  \eqn{M-k}{M-k} rows as free parameters. \eqn{\Phi}{Phi} is also free.

  The optimization is not iterative and does not use the gradient projection
  algorithm. The function can be used directly or passed to factor analysis
  functions like \code{\link[stats]{factanal}} via the \code{rotation}
  argument.

  Viewed as a rotation method it is oblique, with an explicit solution.
  Given an initial loadings matrix \eqn{L}{L} partitioned as
  \eqn{L = (L_1^T, L_2^T)^T}{L = rbind(L1, L2)}, the rotated loadings
  matrix is \eqn{(I, (L_2 L_1^{-1})^T)^T}{rbind(I, L2 \%*\% solve(L1))}
  and \eqn{\Phi = L_1 L_1^T}{Phi = L1 \%*\% t(L1)}, where \eqn{I}{I} is
  the \eqn{k \times k}{k x k} identity matrix. It is assumed that
  \eqn{\Phi = I}{Phi = I} for the initial loadings matrix.

  Not all authors consider this representation to be a rotation in the
  strict sense.

  This parameterization has several useful properties:

  \enumerate{
    \item It can be useful for comparison with published results in this
          parameterization.
    \item Standard errors are more straightforward to compute because the
          solution corresponds to an unconstrained optimization.
    \item One may have prior knowledge about which reference variables load
          on only one factor without imposing restrictive constraints on
          other loadings --- in this sense it has similarities to CFA.
    \item For some purposes, only the subspace spanned by the factors
          matters, not the specific parameterization within this subspace.
    \item Back-predicted indicators (the explained portion of the
          indicators) do not depend on the rotation method. Combined with
          the greater ease of obtaining correct standard errors, this
          allows easier and more accurate prediction standard errors.
  }

  One use of this parameterization is obtaining good starting values for
  subsequent rotation, though it may seem counterintuitive to rotate
  towards this solution afterwards.
}
\examples{
  data("WansbeekMeijer", package = "GPArotation")
  fa.unrotated <- factanal(factors = 2, covmat = NetherlandsTV,
                           rotation = "none")

  # Direct call
  fa.eiv <- eiv(fa.unrotated$loadings)

  # Equivalent via factanal rotation argument
  fa.eiv2 <- factanal(factors = 2, covmat = NetherlandsTV,
                      rotation = "eiv")

  # Compare unrotated, eiv, and factanal eiv loadings
  cbind(loadings(fa.unrotated), loadings(fa.eiv), loadings(fa.eiv2))

  # Eiv rotation with a different identity set
  fa.eiv3 <- eiv(fa.unrotated$loadings, identity = 6:7)
  cbind(loadings(fa.unrotated), loadings(fa.eiv), loadings(fa.eiv3))
}
\seealso{
  \code{\link{echelon}},
  \code{\link{rotations}},
  \code{\link{GPForth}},
  \code{\link{GPFoblq}}
}
\references{

  \enc{Hägglund}{Haggland}, G. (1982). Factor analysis by instrumental
    variables methods. \emph{Psychometrika}, \bold{47}, 209--222.

  Lewin-Koh, S.C. and Amemiya, Y. (2003). Heteroscedastic factor analysis.
    \emph{Biometrika}, \bold{90}, 85--97.

  Wansbeek, T. and Meijer, E. (2000). \emph{Measurement Error and
    Latent Variables in Econometrics}. North-Holland.
      }

\author{Erik Meijer and Paul Gilbert.}
\concept{rotation}
\keyword{multivariate}


