lm_arma: MLR in Armadillo

View source: R/RcppExports.R

lm_armaR Documentation

MLR in Armadillo

Description

Perform Multiple Linear Regression using armadillo in C++

Usage

lm_arma(y, X)

Arguments

y

A vec of length N x 1 containing the responses.

X

A mat with dimensions N x p, which is the design matrix.

Value

A field<vec> with:

coef

Coefficients

resid

Residuals

sigma2

Sigma^2

Examples

x = cbind(1,1:10)
y = cumsum(rep(.45,10))

lm_arma(y, x)[[1]]

coef(lm(y~x-1))

schoi355/gmwm documentation built on April 11, 2022, 1:21 a.m.