Learn R Programming

psre (version 0.1.2)

srr_imp: Absolute Importance Measure

Description

Calculates absolute importance along the lines consistent with relative importance as defined by Silber, Rosenbaum and Ross (1995)

Usage

srr_imp(
  obj,
  data,
  boot = TRUE,
  R = 250,
  level = 0.95,
  pct = FALSE,
  combine_terms = NULL,
  ...
)

Value

A data frame of importance measures with optimal bootstrapped confidence intervals.

Arguments

obj

Model object, must be able to use predict(obj, type="terms").

data

A data frame used to estimate the model.

boot

Logical indicating whether bootstrap confidence intervals should be produced and included.

R

If boot=TRUE, the number of bootstrap samples to be used.

level

Confidence level used for the confidence interval.

pct

Logical indicating whether importance figures should be turned into percentages. Default is TRUE.

combine_terms

A named list of the names of terms to be combined into one.

...

Other arguments being passed down to boot.

References

Silber, J. H., Rosenbaum, P. R. and Ross, R N (1995) Comparing the Contributions of Groups of Predictors: Which Outcomes Vary with Hospital Rather than Patient Characteristics? JASA 90, 7–18.

Examples

Run this code
data(gss)
mod <- glm(childs ~ sei10 + sex + educ + age, 
            data=gss, family=poisson)
srr_imp(mod, data=gss)

Run the code above in your browser using DataLab