Estimates the coefficients of a log-variance linear model (LVLM). See Details.
lvlm_fit(y2, Z, method = c("IRLS", "Fisher", "LS"), gamma0, maxit = 25, epsilon = 1e-08)
y2 | Square of response vector of length |
---|---|
Z | Variance covariate matrix of size |
method | Which fitting algorithm to use. See Details. |
gamma0 | Initial variance parameter vector of length |
maxit | Maximum number of iteration of the fitting algorithm (see Details). |
epsilon | Tolerance threshold for termination of the algorithm (see Details). |
The MLE (or least-squares estimate) of gamma
as a vector of length q
.
The log-variance linear model (LVLM) is defined as $$ y_i \mid \boldsymbol{z}_i \stackrel{\mathrm{ind}}{\sim} \mathcal N\big(0, \exp(\boldsymbol{z}_i'\boldsymbol{\gamma})\big), $$ where for each subject \(i\), \(y_i\) is the response, and \(\boldsymbol{z}_i \in \mathbb{R}^q\) is the variance covariate vector.
Three types of fitting algorithms for \(\boldsymbol{\gamma}\) are provided. method = Fisher
and IRLS
are Fisher Scoring and Iteratively Reweighted Least-Squares MLE-finding algorithms, respectively. The former is faster while the latter is more stable. method = LS
is a least-squares estimator, which is the fastest. It is a consistent estimator but not as efficient as the MLE.
Warning: This R wrapper function provides a direct interface to the C++ source code. Incorrect argument specification may lead to abrupt termination of the R session.