dof | R Documentation |
dof
extracts the degrees of freedom of the estimated parameter
from the object of class MGLMsparsereg
.
## S4 method for signature 'MGLMsparsereg' dof(object)
object |
an object of class |
Returns degrees of freedom of object
.
library("MGLM") dist <- "DM" n <- 100 p <- 10 d <- 5 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) pen <- "group" ngridpt <- 30 spmodelfit <- MGLMsparsereg(formula = Y ~ 0 + X, dist = dist, lambda = Inf, penalty = pen) df <- dof(spmodelfit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.