Learn R Programming

MGLM (version 0.2.3)

path: Extract path

Description

path extracts from object of the class MGLMtune the path of BIC, AIC, log-likelihood and degrees of freedom given each tuning parameter.

Usage

# S4 method for MGLMtune
path(object)

Value

Returns a path of object.

Arguments

object

an object of class MGLMtune from which path can be extracted.

Examples

Run this code
library("MGLM")
dist <- "DM"
n <- 30
p <- 5
d <- 3
set.seed(118)
m <- rbinom(n, 200, 0.8)
X <- matrix(rnorm(n * p), n, p)
alpha <- matrix(0, p, d)
alpha[c(1, 3, 5), ] <- 1
Alpha <- exp(X %*% alpha)
Y <- rdirmn(size = m, alpha = Alpha)
select <- MGLMtune(Y ~ 0 + X, dist = "DM", penalty = "nuclear",
ngridpt = 4, display = FALSE)
select_path <- path(select)

Run the code above in your browser using DataLab