GLSMeans: Generalized Least Squares

Description Usage Arguments Details Value

View source: R/GLSMeans.R

Description

This function applies generalized least squares to estimate the unknown parameters of a linear model X = D beta + E, where X has dimension n by m, D has dimension n by k, and beta has dimension k by m.

Usage

1
GLSMeans(X, D, B.inv)

Arguments

X

data matrix.

D

design matrix.

B.inv

inverse covariance matrix.

Details

Example

1
2
3
4
X <- matrix(1:12, nrow=4, ncol=3)
D <- twoGroupDesignMatrix(1:2, 3:4)
B.inv <- diag(4)
beta.hat <- GLSMeans(X, D, B.inv)

Value

Returns the estimated parameters of the linear model, a matrix of dimensions k by m, where k is the number of columns of D, and m is the number of columns of X.


jointMeanCov documentation built on May 6, 2019, 1:09 a.m.