betah: Point estimate for beta, used in linear regression

Description Usage Arguments Details Examples

View source: R/LinearRegression.R

Description

Notice that this is done by solving the linear system: (X'X) beta = X'Y

Usage

1
betah(X, Y)

Arguments

X

Design matrix

Y

Response vector

Details

Rather than using a direct method, ie.

beta = (X'X)^(-1)X'Y

We shall instead use a package known as 'pcig' that solves a pre-conditioned conjugate gradient formulation, and is more numerically stable whenever the matrix approaches singularity.

Examples

1
2
betah(matrix(c(1,2,3,4,5,6), nr=3, byrow=TRUE),
      matrix(c(1,2,3), nr=3))

MalachiTimothyPhillips/ggfast documentation built on May 18, 2019, 11:27 p.m.