CI_g: Calculates a confidence interval for a standardized mean...

CI_gR Documentation

Calculates a confidence interval for a standardized mean difference effect size

Description

Calculates a confidence interval given a g_REML, a g_HPS, or a g_mlm object using either a central t distribution (for a symmetric interval) or a non-central t distribution (for an asymmetric interval).

Arguments

g

an estimated effect size object of class g_REML, class g_HPS, or class g_mlm.

cover

confidence level

bound

numerical tolerance for non-centrality parameter in qt.

symmetric

If TRUE (the default), use a symmetric confidence interval. If FALSE, use a non-central t approximation to obtain an asymmetric confidence interval.

Value

A vector of upper and lower confidence bounds.

Examples

data(Laski)
Laski_RML <- lme(fixed = outcome ~ treatment,
                 random = ~ 1 | case,
                 correlation = corAR1(0, ~ time | case),
                 data = Laski)
Laski_g_REML <- suppressWarnings(
  g_REML(Laski_RML, p_const = c(0,1), 
         r_const = c(1,0,1), returnModel = FALSE)
)
CI_g(Laski_g_REML, symmetric = TRUE)
CI_g(Laski_g_REML, symmetric = FALSE)

Laski_HPS <- with(Laski, effect_size_MB(outcome, treatment, case, time))
CI_g(Laski_HPS, symmetric = FALSE)

Laski_g_mlm <- g_mlm(mod = Laski_RML, p_const = c(0,1), r_const = c(1,0,1))
CI_g(Laski_g_mlm, symmetric = FALSE)


jepusto/scdhlm documentation built on Feb. 27, 2024, 4:45 p.m.