WLS: Computes a weighted least squares linear regression on...

Description Usage Arguments Value Examples

View source: R/WLS.R

Description

Computes a weighted least squares linear regression on possibly multivariate responses

Usage

1
WLS(Y, X, W)

Arguments

Y

a numeric matrix, to act as response

X

a numeric matrix, to act as covariates

W

a numeric matrix, to act as weights

Value

a vector of regression coefficients

Examples

1
2
3
4
5
6
 ## Not run: 
 DataY = cbind(CCU12_Precip$Precip, CCU12_Precip$TMax);
DataX = cbind(rep(1, length(CCU12_Precip$Precip)), CCU12_Precip$TMin)			
BetaHat.New = WLS(DataY, DataX)
    		
## End(Not run)

UStatBookABSC documentation built on May 2, 2019, 8:24 a.m.