logLik: Extract log-likelihood

Description Usage Arguments Value Examples

Description

This is a method function written to extract log-liklihood from 'smle' and 'selection' objects. It refits the model by glm() based on the response and the selected features after screening (selection), and returns an object of 'logLik' from the generic.

Usage

1
2
3
4
5
## S3 method for class 'smle'
logLik(object, ...)

## S3 method for class 'selection'
logLik(object, ...)

Arguments

object

Object of class 'smle' or 'sdata'.

...

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

1
2
3
4
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)

SMLE documentation built on Oct. 1, 2021, 5:07 p.m.