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

Description Arguments Value Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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(Laski_RML, p_const = c(0,1), r_const = c(1,0,1), returnModel = TRUE)
CI_g(Laski_g_mlm, symmetric = FALSE)

scdhlm documentation built on Jan. 13, 2021, 7:10 p.m.