moecalc | R Documentation |
Computes the margin of error for various objects.
moecalc(
x,
factorname = NULL,
levelnames = NULL,
coef.idx = NULL,
est = NULL,
ci = NULL,
base = TRUE,
basename = "base",
conf.level = 1.96
)
x |
the object for which we compute margins of error |
factorname |
name of factor |
levelnames |
names of factor levels |
coef.idx |
index of coefficient to use |
est |
estimates |
ci |
confidence intervals |
base |
baseline |
basename |
name of baseline |
conf.level |
level of confidence to use |
If x
is a model, must have factorname or coefficient index (coef.idx)
If input factorname, will compute ErrBars by factorname (for given model)
If input coefficient index, will compute ErrBars simply by index only (even they are not factor)
If x
is ses.moecalc
object, will compute ErrBars simply by given ses.moecalc
object
a moecalc
object
fit <- lm(Sepal.Length ~ Species, data = iris)
(mc <- moecalc(fit, "Species"))
summary(mc)
plot(mc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.