GLS {evolvability}R Documentation

Generalized least square

Description

GLS utilizes lm.fit and Cholesky decomposition to fit a generalized least squares regression

Usage

GLS(y, X, R = NULL, L = NULL, coef_only = FALSE)

Arguments

y

response variable

X

design matrix

R

residual covariance or correlation matrix (can be sparse), ignored if L is provided.

L

lower triangular matrix of the Cholesky decomposition of R (optional).

coef_only

reduces the output of the model to the estimated coefficients (and the generalized residual sums of squares) only.

Details

Note that the size of R does not matter (i.e. if R is multiplied by a scalar, the results don't change). Note also that the R-squared is estimated as 1-GSSE/GSST, where GSSE is the generalized residual sum of squares (i.e. the objective function score of the model) and GSST is the generalized total sum of squares (i.e. the objective function score of the model when only the intercept is included in the model)

Value

GLS a list of

Author(s)

Geir H. Bolstad


[Package evolvability version 2.0.0 Index]