se.bar: Standard Error and Fisher's LSD Bars for Interaction Plots

Description Usage Arguments Value See Also Examples

Description

Use se.bar to see the standard error. Use lsd.bar inside a Lattice panel to display an LSD bar. Setting cap="SD" displays an SD rather than LSD. Setting crit=1 displays an SE. Asterisk * beside bar indicated that harmonic mean of unequal sample sizes was used in computation.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
se.bar(xpos, ypos, bar, mod = "", cap = "SE", adj = 0, width = .01,
   lty, horiz, ...)
lsd.bar(object, ...)
## Default S3 method:
lsd.bar(object, response, group, ...)
## S3 method for class 'lm'
lsd.bar(object, data, factors, lsm, xpos, ypos,
  rdf = df.resid(object), level = .05, crit,
  cap = paste(100*level,"%\nLSD",sep=""), mod, tol, ...)
## S3 method for class 'lme'
lsd.bar(object, data, ...)
## S3 method for class 'lmer'
lsd.bar(object, data, ...)

Arguments

xpos

x position(s) of bar(s).

ypos

y position(s) of bar(s).

bar

height(s) of bar(s).

mod

modifier to bar caption ("*" used in lsd.bar for unequal sample sizes)

cap

caption for each bar (default for LSD with level; sets up standard deviation (SD) if set to "SD"; omitted if "")

adj

0 = left adjust caption to right of bar,1 = right adjust caption to left of bar.

width

relative width of bar ends (can be 0).

object

factor to be plotted on the horizontal axis (for lsd.bar.default) or fitted model object (for lsd.bar.lm).

lsm

least squares means object from lsmean

group

factor whose levels will be separate traces.

response

numeric vector.

data

data.frame in which to interpret the variables named in object (taken from object if omitted).

factors

Character string of length 2 with names of object and trace.factor as found in object and data (default is first 2 factors in object).

rdf

residual degrees of freedom.

level

significance level.

crit

2-sided tail critical value of t-distribution.

tol

tolerance level

lty

line types

horiz

put bar horizontal if TRUE

...

optional specification of other parameters to be passed to se.bar. Standard error bars (se.bar) or an LSD bar (lsd.bar) are plotted at position(s) cbind(xpos,ypos). Lsd.bar uses the S method, with the lsd.bar.default calling lsd.bar.lm after setting up the fit, data and factor. lsd.bar.lm in turn calls se.bar after determining the barheight using sample sizes, rdf, sd and level. Confidence intervals or othermultiple bars can be constructed ci.bar (see ci.plot).

Value

a list containg xpos, ypos, bar, mod, cap, adj, width.

See Also

lsd.plot, ci.plot.

Examples

1
2
3
4

byandell/pda documentation built on May 13, 2019, 9:27 a.m.