Learn R Programming

sasLM (version 1.0.1)

lr: Linear Regression with g2 inverse

Description

Coefficients are calculated with the g2 inverse. The output is similar to summary(lm()).

Usage

lr(Formula, Data, eps=1e-8)

Value

The result is comparable to that of SAS PROC REG.

Estimate

point estimate of parameters, coefficients

Std. Error

standard error of the point estimate

t value

value for the t distribution

Pr(>|t|)

probability of a larger absolute t value from the t distribution with the residual degrees of freedom

Arguments

Formula

a conventional formula for a linear model

Data

a data.frame to be analyzed

eps

A value less than this is considered zero.

Author

Kyun-Seop Bae k@acr.kr

Details

It uses G2SWEEP to get the g2 inverse. The result is similar to summary(lm()) without options.

Examples

Run this code
  lr(uptake ~ Plant + Type + Treatment + conc, CO2)
  lr(uptake ~ Plant + Type + Treatment + conc - 1, CO2)
  lr(uptake ~ Type, CO2)
  lr(uptake ~ Type - 1, CO2)

Run the code above in your browser using DataLab