surr_rsq_ci | R Documentation |
This function generates the interval measure of surrogate R-squared by bootstrap.
surr_rsq_ci(
object,
alpha = 0.05,
B = 2000,
asym = FALSE,
parallel = FALSE,
...
)
object |
A object of class |
alpha |
The significance level alpha. The confidence level is 1-alpha. |
B |
The number of bootstrap replications. |
asym |
A logical argument whether use the asymptotic version of our surrogate R-squared. More details are in the paper of Liu et al. (2023). |
parallel |
logical argument whether conduct parallel for bootstrapping surrogate R-squared
to construct the interval estimate. The clusters need to be registered through
|
... |
Additional optional arguments. |
An list that contains the CI_lower, CI_upper.
data("RedWine")
full_formula <- as.formula(quality ~ fixed.acidity + volatile.acidity + citric.acid
+ residual.sugar + chlorides + free.sulfur.dioxide +
total.sulfur.dioxide + density + pH + sulphates + alcohol)
fullmodel <- polr(formula = full_formula,data=RedWine, method = "probit")
select_model <- update(fullmodel, formula. = ". ~ . - fixed.acidity -
citric.acid - residual.sugar - density")
surr_rsq_select <- surr_rsq(select_model, fullmodel, data = RedWine, avg.num = 30)
# surr_rsq_ci(surr_rsq_select, alpha = 0.05, B = 2000, parallel = FALSE) # Not run, it takes time.
# surr_rsq_ci(surr_rsq_select, alpha = 0.05, B = 2000, parallel = TRUE) # Not run, it takes time.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.