inst/shiny-examples/scdhlm/code-chunks/es-RML-MB.R

# Calculate effect size with g_mlm()
A <- {user_A}
B <- {user_B}
p_const <- c(rep(0L, length({user_FE_base})), (B - A)^as.integer({user_FE_trt})) 
p_const <- {user_pconstant}
r_const <- c({user_rconst_base}, {user_rconst_trt}, {user_rconst_cor}, {user_rconst_var}, 1L) # specify whether using random effects, cor struct, var struct, and level-1 errors
r_const <- {user_rconstant}
ES_RML <- g_mlm(fit_RML, p_const = p_const, r_const = r_const, infotype = "expected", returnModel = TRUE)
summary(ES_RML)

Try the scdhlm package in your browser

Any scripts or data that you put into this service are public.

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