margin.plot.lm {pda} | R Documentation |
## S3 method for class 'lm': margin.plot(object, reduced, data, factors, lsm, margin, error = "full", bar.plot = "lsd", xlab, ylab, ...)
object |
full model object from linear model fit |
reduced |
reduced model object, for computation of marginal means or effects(default=object) |
data |
data frame in which to interpret the variables named in the full and reduced objects (determined from reduced fit if omitted) |
factors |
Character string of length 2 with names of x.factor and trace.factoras found in fit and data (default is first 2 factors in fit). |
lsm |
Least squares means for plotting (default is fit from full model). |
margin |
Least squares marginal means for horizontal axis(default is fit from reduced model rounded to proper precision). |
error |
model to use for error calculation ("full" or "reduced"). |
bar.plot |
error bars:Fisher's LSD ("lsd"=default)or confidence intervals ("ci")or none ("none"). |
xlab,ylab |
plot parameters |
... |
optional specification of other parameters to be passed to plotting routines. |
a plot will be created showing the requested function of
responses for each level of the x.factor
at each level of the
trace.factor
. By default, lines for each value of the
trace.factor
are drawn in different styles so that they may
be more easily distinguished.
lsd.plot
, margin.plot
,
tukey.plot
.
data(ToothGrowth) ToothGrowth$dose = ordered(ToothGrowth$dose) reduced <- lm(len~dose+supp, ToothGrowth) full <- update(reduced,len~dose*supp) margin.plot.lm(full,reduced,ToothGrowth)