lvlm_fit: Low-level fitting function for the LVLM model.

Description Usage Arguments Details Value

View source: R/hlm_fit.R

Description

Estimates the coefficients of a log-variance linear model (LVLM). See Details.

Usage

1
2
lvlm_fit(y2, Z, method = c("IRLS", "Fisher", "LS"), gamma0, maxit = 25,
  epsilon = 1e-08)

Arguments

y2

Square of response vector of length n.

Z

Variance covariate matrix of size n x q.

method

Which fitting algorithm to use. See Details.

gamma0

Initial variance parameter vector of length q. If missing a least-squares estimate is used (see Details).

maxit

Maximum number of iteration of the fitting algorithm (see Details).

epsilon

Tolerance threshold for termination of the algorithm (see Details).

Details

The log-variance linear model (LVLM) is defined as

y_i | z_i ~ind N(0, exp(z_i'γ)),

where for each subject i, y_i is the response, and z_i \in R^q is the variance covariate vector.

Three types of fitting algorithms for γ 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.

Value

The MLE (or least-squares estimate) of gamma as a vector of length q.


mlysy/hlm documentation built on Nov. 4, 2019, 7:26 p.m.