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 confidence interval

adj

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

ref

reference or control level for Dunnett test

PLOT

whether to plot or not the diffogram

reverse

reverse A - B to B - A

...

arguments to be passed to plot

Details

It corresponds to 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 t distribution

Df

degree of freedom

Pr(>|t|)

probability of larger than absolute t value from t distribution with residual's degree 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 Nov. 19, 2023, 5:12 p.m.