est: Estimate Linear Functions

View source: R/est.R

estR Documentation

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)

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.

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.

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

Author(s)

Kyun-Seop Bae k@acr.kr

See Also

ESTM, PDIFF

Examples

  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

sasLM documentation built on June 15, 2026, 9:07 a.m.