Learn R Programming

psychmeta (version 0.2.4)

confidence: Construct a confidence interval

Description

Function to construct a confidence interval around an effect size or mean effect size.

Usage

confidence(mean, se = NULL, sd = NULL, k = 1, conf_level = 0.95,
  conf_method = "t")

Arguments

mean

Mean effect size (if used in a meta-analysis) or observed effect size (if used on individual statistics).

se

For individual statistic.: standard error of the statistic.

sd

For meta-analyses: Observed standard deviation of effect sizes, before accouting for variance from artifacts.

k

For meta-analyses: Number of studies in the meta-analysis.

conf_level

Confidence level that defines the width of the confidence interval (default = .95).

conf_method

Distribution to be used to compute the width of confidence intervals. Available options are "t" for t distribution or "norm" for normal distribution.

Value

A matrix of confidence intervals of the specified width.

Details

$$CI=mean_{es}\pm quantile\times SE_{es}$$

Examples

Run this code
# NOT RUN {
confidence(mean = .3, sd = .15, k = 10, conf_level = .95)
confidence(mean = c(.3, .5), sd = c(.15, .2), k = c(10, 5), conf_level = .95)
confidence(mean = c(.3, .5), se = c(.15, .2), conf_level = .95)
# }

Run the code above in your browser using DataLab