REG {sasLM}R Documentation

Regression of Linear Least Square, similar to SAS PROC REG

Description

REG is similar to SAS PROC REG.

Usage

  REG(Formula, Data, conf.level=0.95, HC=FALSE, Resid=FALSE, Weights=1,
      summarize=TRUE)

Arguments

Formula

a conventional formula for a linear model

Data

a data.frame to be analyzed

conf.level

confidence level for the confidence limit

HC

heteroscedasticity related output is required such as HC0, HC3, White's first and second moment specification test

Resid

if TRUE, fitted values (y hat) and residuals will be returned

Weights

weights for each observation or residual square. This is usually the inverse of each variance.

summarize

If this is FALSE, REG returns just lfit result.

Details

It performs the core function of SAS PROC REG.

Value

The result is comparable to that of SAS PROC REG.

The first part is ANOVA table.

The second part is measures about fitness.

The third part is the estimates of coefficients.

Estimate

point estimate of parameters, coefficients

Estimable

estimability: 1=TRUE, 0=FALSE. This appears only when at least one inestimability occurs.

Std. Error

standard error of the point estimate

Lower CL

lower confidence limit with conf.level

Upper CL

lower confidence limit with conf.level

Df

degree of freedom

t value

value for t distribution

Pr(>|t|)

probability of larger than absolute t value from t distribution with residual's degree of freedom

The above result is repeated using HC0 and HC3, with following White's first and second moment specification test, if HC option is specified. The t values and their p values with HC1 and HC2 are between those of HC0 and H3.

Fitted

Fitted value or y hat. This is returned only with Resid=TRUE option.

Residual

Weighted residuals. This is returned only with Resid=TRUE option.

If summarize=FALSE, REG returns;

coeffcients

beta coefficients

g2

g2 inverse

rank

rank of the model matrix

DFr

degree of freedom for the residual

SSE

sum of square error

Author(s)

Kyun-Seop Bae k@acr.kr

See Also

lr

Examples

  REG(uptake ~ Plant + Type + Treatment + conc, CO2)
  REG(uptake ~ conc, CO2, HC=TRUE)
  REG(uptake ~ conc, CO2, Resid=TRUE)
  REG(uptake ~ conc, CO2, HC=TRUE, Resid=TRUE)
  REG(uptake ~ conc, CO2, summarize=FALSE)

[Package sasLM version 0.10.4 Index]