Description Usage Arguments Value Author(s) See Also Examples
View source: R/deviance.bsrr.R
Similar to other deviance methods, which returns deviance from a fitted "bsrr.one
" object.
1 2 |
object |
A " |
best.model |
Whether only return the loglikelihood of the best model. Default is |
... |
additional arguments |
A matrix or vector containing the deviance for each model is returned.
For bsrr
object fitted by sequantial
method, values in each row in the
returned matrix corresponding to the model size in s.list
, and each column the shrinkage parameters
in lambda.list
.
For bsrr
object fitted by gsection
, pgsection
and psequential
, the returned vector
contains deviance for fitted models in each iteration. The coefficients of those model can be extracted
from beta.all
and coef0.all
in the bsrr
object.
Liyuan Hu, Kangkang Jiang, Yanhang Zhang, Jin Zhu, Canhong Wen and Xueqin Wang.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Generate simulated data
n <- 200
p <- 20
k <- 5
rho <- 0.4
seed <- 10
Tbeta <- rep(0, p)
Tbeta[1:k*floor(p/k):floor(p/k)] <- rep(1, k)
Data <- gen.data(n, p, k, rho, family = "gaussian", seed = seed)
lm.bsrr <- bsrr(Data$x, Data$y, method = "sequential")
deviance(lm.bsrr)
deviance(lm.bsrr, best.model = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.