FitAndResiduals: Computes a linear regression fit and residuals on possibly...

Description Usage Arguments Value Examples

View source: R/FitAndResiduals.R

Description

Computes a linear regression fit and residuals on possibly multivariate responses

Usage

1
FitAndResiduals(Y, X, BetaHat)

Arguments

Y

a numeric matrix, to act as response

X

a numeric matrix, to act as covariates

BetaHat

a numeric matrix, to act as slope

Value

a list consisting of two vectors, the fitted values and residuals

Examples

1
2
3
4
5
6
7
 ## 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)
Results.New = FitAndResiduals(DataY, DataX, BetaHat.New);
    		
## End(Not run)

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