surr_rsq_ci {SurrogateRsq}R Documentation

A function to calculate the interval estimate of the surrogate R-squared measure

Description

This function generates the interval measure of surrogate R-squared by bootstrap.

Usage

surr_rsq_ci(surr_rsq, alpha = 0.05, B = 1000, ...)

Arguments

surr_rsq

A object of class "surr_rsq" that is generated by the function "surr_rsq". It contains the following components: surr_rsq, reduced_model, full_model, and data.

alpha

The significance level alpha. The confidence level is 1-alpha.

B

The number of bootstrap replications.

...

Additional optional arguments.

Value

An list that contains the CI_lower, CI_upper.

Examples

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 = 1000) # Not run, it takes time.


[Package SurrogateRsq version 0.2.1 Index]