Learn R Programming

sasLM (version 0.6.0)

REG: Regression of Linear Least Square, similar to SAS PROC REG

Description

REG is similar to SAS PROC REG.

Usage

REG(Formula, Data, eps=1e-8, summarize=TRUE)

Arguments

Formula

a conventional formula for a linear model

Data

a data.frame to be analyzed

eps

Less than this value is considered as zero.

summarize

If this is FALSE, REG returns just lfit result.

Value

The result is comparable to that of SAS PROC REG.

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

t value

value for t distribution

Pr(>|t|)

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

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

Details

It performs the core function of SAS PROC REG.

See Also

lr

Examples

Run this code
# NOT RUN {
  REG(uptake ~ Plant + Type + Treatment + conc, CO2)
  REG(uptake ~ conc, CO2, summarize=FALSE)
# }

Run the code above in your browser using DataLab