View source: R/selection_model.R
| selection_model | R Documentation |
Estimate step or beta selection model, with standard errors and confidence intervals based on either cluster-robust variance estimators (i.e., sandwich estimators) or cluster-level bootstrapping to handle dependent effect size estimates.
selection_model(
data,
yi,
vi,
sei,
ai,
cluster,
selection_type = c("step", "beta"),
alternative = "greater",
steps = NULL,
mean_mods = NULL,
var_mods = NULL,
sel_mods = NULL,
sel_zero_mods = NULL,
priors = define_priors(),
subset = NULL,
estimator = "CML",
vcov_type = "robust",
CI_type = "large-sample",
conf_level = 0.95,
theta = NULL,
optimizer = NULL,
optimizer_control = list(),
use_jac = NULL,
bootstrap = "none",
R = 1999,
retry_bootstrap = 0L,
valence_check = TRUE,
...
)
data |
|
yi |
vector of effect sizes estimates. |
vi |
vector of sample variances. If |
sei |
vector of sampling standard errors. If |
ai |
optional vector of analytic weights. |
cluster |
vector indicating which observations belong to the same cluster. |
selection_type |
character string specifying the type
selection model to estimate, with possible options
|
alternative |
character string specifying the direction
of the alternative hypothesis used in computing p-values
for the observed effect sizes, with possible options
|
steps |
If |
mean_mods |
optional model formula for moderators related to average effect size magnitude. |
var_mods |
optional model formula for moderators related to effect size heterogeneity. |
sel_mods |
optional model formula for moderators related
to the probability of selection. Only relevant for
|
sel_zero_mods |
optional model formula for moderators
related to the probability of selection for p-values below
the lowest threshold value of |
priors |
a |
subset |
optional logical expression indicating a subset of observations to use for estimation. |
estimator |
vector indicating whether to use the
composite marginal likelihood estimator (option
|
vcov_type |
character string specifying the type of
variance-covariance matrix to calculate, with possible
options |
CI_type |
character string or vector specifying the type
of confidence interval to calculate, with possible options
|
conf_level |
desired coverage level for confidence
intervals, with the default value set to |
theta |
optional numeric vector of starting values to use in optimization routines. |
optimizer |
character string indicating the optimizer to
use. Ignored if |
optimizer_control |
an optional list of control parameters to be used for optimization |
use_jac |
logical indicating whether to use the Jacobian
of the estimating equations for optimization. If
|
bootstrap |
character string specifying the type of
bootstrap to run, with possible options |
R |
number of bootstrap replications, with a default of
|
retry_bootstrap |
number of times to re-draw a bootstrap
sample in the event of non-convergence, with a default of
|
valence_check |
logical value controlling whether to
check that the valence of the median effect size estimate
is consistent with the direction of the specified
|
... |
further arguments passed to
|
An object of class "selmodel" containing the
following components:
estdata.frame with parameter estimates, standard errors, and
confidence intervals. Note that the results do not include p-values so
as to focus interpretation on the parameter estimates, rather than on
the statistical significance of any given parameter.
vcovmatrix containing the estimated variance-covariance matrix of the parameter estimates.
methodcharacter string indicating the optimization method used to solve for parameter estimates.
infofurther information about the optimization results.
lllog likelihood of the model evaluated at the reported parameter estimates.
wpllweighted partial log likelihood of the random effects model, with weights corresponding to inverse selection probabilities.
n_clustersnumber of independent clusters of effect sizes.
n_effectsnumber of effect size estimates in the data.
...some additional elements containing information about the methods used to estimate the model.
res_ML <- selection_model(
data = self_control,
yi = g,
sei = se_g,
cluster = studyid,
steps = 0.025,
estimator = "CML",
bootstrap = "none"
)
res_ML
summary(res_ML)
# configure progress bar
progressr::handlers(global = TRUE)
res_hybrid <- selection_model(
data = self_control,
yi = g,
sei = se_g,
cluster = studyid,
steps = 0.025,
estimator = "ARGL",
bootstrap = "multinomial",
CI_type = "percentile",
R = 19
)
res_hybrid
summary(res_hybrid)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.