summary.BranchGLMVS: Summary Method for BranchGLMVS

View source: R/summaryBranchGLMVS.R

summary.BranchGLMVSR Documentation

Summary Method for BranchGLMVS

Description

Summary Method for BranchGLMVS

Usage

## S3 method for class 'BranchGLMVS'
summary(object, ...)

Arguments

object

a BranchGLMVS object.

...

further arguments passed to other methods.

Value

An object of class summary.BranchGLMVS which is a list with the following components

results

a data frame which has the metric values for the best models along with the variables included in each model

initmodel

the initial BranchGLM object that was supplied to the VariableSelection function

formulas

a list containing the formulas of the best models

metric

the metric used to perform variable selection

Examples


Data <- iris
Fit <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")

# Doing branch and bound selection 
VS <- VariableSelection(Fit, type = "branch and bound", metric = "BIC", 
bestmodels = 10, showprogress = FALSE)
VS

## Getting summary of the process
Summ <- summary(VS)
Summ

## Plotting the BIC of the best models
plot(Summ, type = "b")

## Plotting the variables in the best models
plot(Summ, ptype = "variables")

## Getting the best model according to BIC
FinalModel <- fit(Summ, which = 1)
FinalModel
 

BranchGLM documentation built on Aug. 31, 2023, 5:17 p.m.