Learn R Programming

sasLM (version 1.0.1)

est: Estimate Linear Functions

Description

Estimates Linear Functions with a given GLM result.

Usage

est(L, X, rx, conf.level=0.95, adj="lsd", paired=FALSE)

Value

Estimate

point estimate of the input linear contrast

Lower CL

lower confidence limit by the "lsd" method

Upper CL

upper confidence limit by the "lsd" method

Std. Error

standard error of the point estimate

t value

value for the t distribution, for methods other than "scheffe"

F value

value for the F distribution, for the "scheffe" method only

Df

degrees of freedom of the residuals

Pr(>|t|)

probability of a larger absolute t value from the t distribution with the residual degrees of freedom, for methods other than "scheffe"

Pr(>F)

probability of a larger F value from the F distribution with the residual degrees of freedom, for the "scheffe" method only

Arguments

L

a matrix of linear contrast rows to be tested

X

a model (design) matrix from ModelMatrix

rx

a result of the lfit function

conf.level

confidence level of the confidence limit

adj

adjustment method for grouping. This supports "tukey", "bon", "scheffe", "duncan", and "dunnett". This only affects grouping, not the confidence interval.

paired

If this is TRUE, the L matrix is for the pairwise comparison such as that of the PDIFF function.

Author

Kyun-Seop Bae k@acr.kr

Details

It tests rows of linear functions. A linear function means a linear combination of estimated coefficients. It corresponds to the ESTIMATE statement of SAS PROC GLM. The same sample size per group is assumed for the Tukey adjustment.

See Also

ESTM, PDIFF

Examples

Run this code
  x = ModelMatrix(uptake ~ Type, CO2)
  rx = REG(uptake ~ Type, CO2, summarize=FALSE)
  est(t(c(0, -1, 1)), x$X, rx) # Quebec - Mississippi 
  t.test(uptake ~ Type, CO2) # compare with the above

Run the code above in your browser using DataLab