apa_interval | R Documentation |
Creates a character string to report interval estimates, such as frequentist confidence or Bayesian credible intervals.
apa_interval(x, ...)
print_interval(x, ...)
## S3 method for class 'numeric'
apa_interval(
x,
y = NULL,
...,
conf.int = NULL,
interval_type = NULL,
enclose_math = FALSE
)
## S3 method for class 'matrix'
apa_interval(
x,
...,
conf.int = NULL,
interval_type = NULL,
enclose_math = FALSE
)
## S3 method for class 'data.frame'
apa_interval(
x,
...,
conf.int = NULL,
interval_type = NULL,
enclose_math = FALSE
)
## S3 method for class 'list'
apa_interval(
x,
...,
conf.int = NULL,
interval_type = NULL,
enclose_math = FALSE
)
apa_confint(
x,
...,
conf.int = NULL,
interval_type = "CI",
enclose_math = FALSE
)
print_confint(
x,
...,
conf.int = NULL,
interval_type = "CI",
enclose_math = FALSE
)
apa_hdint(x, ..., conf.int = NULL, interval_type = "HDI", enclose_math = FALSE)
print_hdint(
x,
...,
conf.int = NULL,
interval_type = "HDI",
enclose_math = FALSE
)
x |
Numeric. A vector (of length 2, unless |
... |
Further arguments passed on to |
y |
Numeric. An optional vector of the same length as |
conf.int |
Numeric. Confidence level of the interval. Ignored if
level can be inferred from attributes of |
interval_type |
Character. Abbreviation indicating the type of interval
estimate, e.g. |
enclose_math |
Logical. Indicates whether the interval should be
enclosed in |
If possible the confidence level of the interval is inferred from
attributes of x
. For a vector of length 2, the attribute conf.level
is
is consulted; for a matrix
or data.frame
the column names are used,
if they are of the format "2.5 \
If x
is a matrix
or data.frame
the row names are used as names for
the returned list
of intervals.
A single interval is returned as a character
vector of length 1;
multiple intervals are returned as a named list
of character
vectors
of length 1.
apa_num()
apa_confint(1, 2, conf.int = 0.95)
apa_confint(c(1, 2), conf.int = 0.95)
apa_confint(matrix(c(1, 2), ncol = 2), conf.int = 0.95)
apa_confint(confint(lm(cars)))
apa_confint(confint(lm(cars)), digits = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.