lm_arma: MLR in Armadillo

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Perform Multiple Linear Regression using armadillo in C++

Usage

1
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

1
2
3
4
5
6
x = cbind(1,1:10)
y = cumsum(rep(.45,10))

lm_arma(y, x)[[1]]

coef(lm(y~x-1))

SMAC-Group/gmwm documentation built on Sept. 11, 2021, 10:06 a.m.