moecalc {iNZightMR} | R Documentation |
Margin of Error Calculation
Description
Computes the margin of error for various objects.
Usage
moecalc(
x,
factorname = NULL,
levelnames = NULL,
coef.idx = NULL,
est = NULL,
ci = NULL,
base = TRUE,
basename = "base",
conf.level = 1.96
)
Arguments
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 |
Details
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
Value
a moecalc
object
Examples
fit <- lm(Sepal.Length ~ Species, data = iris)
(mc <- moecalc(fit, "Species"))
summary(mc)
plot(mc)
[Package iNZightMR version 2.3.0 Index]