lm_fit: Low-level fitting function for the LM model.

Description Usage Arguments Details Value

View source: R/hlm_fit.R

Description

Calculates the MLE of the coefficients of the usual linear regression model (LM).

Usage

1
lm_fit(y, X, w)

Arguments

y

Vector of observations of length n.

X

Mean covariate matrix of size n x p.

w

Optional positive weights vector of length n.

Details

The LM model is defined as

y_i | x_i ~ind N(x_i'β, 1/w_i),

where for each subject i, y_i is the response, x_i \in R^p is the mean covariate vector, and w_i is an optional positive weight (defaults to 1).

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

MLE estimate of beta as a vector of length p.


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