PDIFF: Pairwise Difference

View source: R/PDIFF.R

PDIFFR Documentation

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, ...)

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

Details

It corresponds to the PDIFF option of SAS PROC GLM.

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

Author(s)

Kyun-Seop Bae k@acr.kr

See Also

LSM, Diffogram

Examples

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

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