Description Usage Arguments Value See Also Examples
Caution: This routine is not fully tested for models with nested
factors or mixed models. Please check results against another
package (e.g. SAS proc mixed). It appears to correctly handle lme
objects, but does
not work well for aov
objects that include Error()
type nesting in the formula. Further, it does not properly handle
polynomial terms–only the linear term is included. For now, create
dummies like x2 = x*x manually and include x2 in your model.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | lsmean(object, ...)
## Default S3 method:
lsmean(object, ..., factors, effects = FALSE, se.fit = TRUE,
adjust.covar = TRUE)
## S3 method for class 'lm'
lsmean(object, data, factors, expr, contrast, effects = FALSE,
se.fit = TRUE, adjust.covar = TRUE, pdiff = FALSE, reorder = FALSE,
lsd, level = .05, rdf, coef, cov, ...)
## S3 method for class 'lme'
lsmean(object, data, factors, ..., rdf, coef, cov)
## S3 method for class 'lmer'
lsmean(object, data, factors, expr, ..., rdf, coef, cov)
## S3 method for class 'listof'
lsmean(object, data, factors, stratum, expr, contrast, ...)
|
object |
response vector (default) or model object (lm). |
... |
factors and covariates (must be same length as y). |
data |
data frame in which to interpret variables(found from object if missing). |
factors |
character vector containing names of x.factor and
trace.factoras first two entries. Must be in |
effects |
drop intercept if |
se.fit |
compute pointwise standard errors if T. |
adjust.covar |
adjust means to average covariate values if T; otherwise use covariate mean for each combination of factors. |
pdiff |
Include letters to signify significant differences. |
reorder |
Reorder means from largest to smallest. |
lsd |
Include average LSD if |
level |
Significance level for |
rdf |
Residual degrees of freedom. |
coef |
Coefficients for fixed effects in object. |
cov |
Covariance matrix for fixed effects. |
expr |
Call expression (formula) |
contrast |
Type of contrasts (default is attribute
|
stratum |
Name of stratum for lsmean calculation as character string. |
Data frame containing unique factor levels of factors, predicted
response (pred) and standard errors (se). WARNING: lsmean may not
function properly if there are empty cells. Standard errors for mixed
models using methods lmer
and listof
are not fully
debugged.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.