logLik.smle {SMLE} | R Documentation |
Extract log-likelihood
Description
This is a method written to extract the log-likelihood from 'smle'
and 'selection'
objects.
It refits the model by glm()
based on the response and the features selected after screening or selection,
and returns an object of 'logLik'
from the generic.
Usage
## S3 method for class 'smle'
logLik(object, ...)
## S3 method for class 'selection'
logLik(object, ...)
Arguments
object |
An object of class |
... |
Forwarded arguments. |
Value
Returns an object of class 'logLik'
. This is a number with at least one attribute,
"df"
(degrees of freedom), giving the number of (estimated) parameters in the model. For more details, see the generic logLik()
in stats.
Examples
set.seed(1)
Data<-Gen_Data(n=100, p=5000, family = "gaussian", correlation="ID")
fit<-SMLE(Y=Data$Y, X=Data$X, k=9, family = "gaussian")
logLik(fit)
[Package SMLE version 2.1-1 Index]