Learn R Programming

sasLM (version 1.0.1)

PDIFF: Pairwise Difference

Description

Estimates pairwise differences by a common method.

Usage

PDIFF(Formula, Data, Term, conf.level=0.95, adj="lsd", ref, PLOT=FALSE, 
        reverse=FALSE, ...)

Value

Returns a table of expectations, t values and p-values. Output columns may vary according to the adjustment option.

Estimate

point estimate of the input linear contrast

Lower CL

lower confidence limit

Upper CL

upper confidence limit

Std. Error

standard error of the point estimate

t value

value for the t distribution

Df

degrees of freedom

Pr(>|t|)

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

Arguments

Formula

a conventional formula for a linear model

Data

a data.frame to be analyzed

Term

a factor name to be estimated

conf.level

confidence level of the confidence interval

adj

"lsd", "tukey", "scheffe", "bon", "duncan", or "dunnett" to adjust the p-value and confidence limit

ref

reference or control level for the Dunnett test. If missing, the first level is used, as SAS does.

PLOT

whether to plot the diffogram

reverse

reverse A - B to B - A

...

arguments to be passed to plot

Author

Kyun-Seop Bae k@acr.kr

Details

It corresponds to the PDIFF option of SAS PROC GLM.

See Also

LSM, Diffogram

Examples

Run this code
  PDIFF(uptake ~ Type*Treatment + as.factor(conc), CO2, "as.factor(conc)")
  PDIFF(uptake ~ Type*Treatment + as.factor(conc), CO2, "as.factor(conc)", adj="tukey")

Run the code above in your browser using DataLab