Learn R Programming

fic (version 1.0.0)

summary.fic: Summarise focused model comparison results

Description

Summarise focused model comparison results

Usage

# S3 method for fic
summary(object, tidy = TRUE, adj = FALSE, ...)

Value

A list of two components, one for the optimal model per focus, and one for the range of focus and RMSE estimates over models.

Arguments

object

Object returned by fic representing focused model comparison statistics for a range of models, and potentially also multiple focus quantities.

tidy

If TRUE (the default) then the results describing the optimal model (per focus) are returned as a data frame, with the names of the parameters in the optimal model collapsed into a single string. If FALSE, the results are returned as a list, including a vector of parameter names.

adj

The optimal model is the one with the lowest root mean square error (RMSE). If adj=TRUE the RMSE is based on the adjusted bias estimator. Otherwise the standard estimator is used.

...

Other arguments, currently unused.

See Also

ggplot_fic, plot.fic for a more detailed visual representation of the focused comparison

Examples

Run this code

## Example from the main vignette, see there for more details

wide.glm <- glm(low ~ lwtkg + age + smoke + ht + ui + smokeage + smokeui,
                data=birthwt, family=binomial)
vals.smoke <-    c(1, 58.24, 22.95, 1, 0, 0, 22.95, 0)
vals.nonsmoke <- c(1, 59.50, 23.43, 0, 0, 0, 0, 0)
X <- rbind("Smokers" = vals.smoke, "Non-smokers" = vals.nonsmoke)
inds0 <- c(1,1,0,0,0,0,0,0)
combs <- all_inds(wide.glm, inds0)
ficres <- fic(wide = wide.glm, inds = combs, inds0 = inds0,
              focus = prob_logistic, X = X)
ggplot_fic(ficres)
summary(ficres)

Run the code above in your browser using DataLab