View source: R/selection_plot.R
| selection_wts | R Documentation |
Calculates the selection weights implied by an estimated model for a user-specified p-value or set of p-values.
selection_wts(mod, pvals, ref_pval, ...)
## S3 method for class 'step.selmodel'
selection_wts(mod, pvals = NULL, ref_pval = NULL, bootstraps = TRUE, ...)
## S3 method for class 'beta.selmodel'
selection_wts(mod, pvals = NULL, ref_pval = NULL, bootstraps = TRUE, ...)
mod |
fitted model of class |
pvals |
numeric vector of p-values for which to calculate selection weights. |
ref_pval |
numeric value of a p-value at which to standardize the
weights. If not |
... |
further arguments passed to some methods. |
bootstraps |
If |
If mod does not include bootstrapped confidence intervals or
if the argument bootstraps = FALSE, then selection_wts will
return a data.frame containing the user-specified p-values and the
selection weights implied by the estimated model parameters.
If mod does include bootstrapped confidence intervals (i.e., when
inherits(mod, "boot.selmodel") is TRUE) and the argument
bootstraps = TRUE, then selection_wts will return a list with
two elements. The first element is a data.frame containing the
user-specified p-values and the selection weights implied by the estimated
model parameters. The second element is a data.frame containing the
user-specified p-values and the selection weights implied by each bootstrap
replicate of the model parameter estimates. The data.frame includes
an additional variable, rep, identifying the bootstrap replicate.
mod <- selection_model(
data = self_control,
yi = g,
sei = se_g,
cluster = studyid,
steps = c(0.025, .5),
estimator = "ARGL"
)
selection_wts(mod, pvals = seq(0, 1, 0.2))
mod_boot <- selection_model(
data = self_control,
yi = g,
sei = se_g,
cluster = studyid,
steps = c(0.025, .5),
estimator = "ARGL",
bootstrap = "multinomial",
CI_type = "percentile",
R = 9
)
selection_wts(mod_boot, pvals = seq(0, 1, 0.2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.