logLik: Extract log-likelihood

logLik.smleR 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 '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

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 Jan. 22, 2023, 1:55 a.m.