deviance.sgdgmf: Compute deviance, AIC and BIC of a GMF model

deviance.sgdgmfR Documentation

Compute deviance, AIC and BIC of a GMF model

Description

Compute deviance, AIC and BIC of a GMF object

Usage

## S3 method for class 'sgdgmf'
deviance(object, ..., normalize = FALSE)

## S3 method for class 'sgdgmf'
AIC(object, ..., k = 2)

## S3 method for class 'sgdgmf'
BIC(object, ...)

Arguments

object

an object of class sgdgmf

...

further arguments passed to or from other methods

normalize

if TRUE, normalize the result using the null-deviance

k

the penalty parameter to be used for AIC; the default is k = 2

Value

The value of the deviance extracted from a sgdgmf object.

Examples

# Load the sgdGMF package
library(sgdGMF)

# Generate data from a Poisson model
data = sim.gmf.data(n = 100, m = 20, ncomp = 5, family = poisson())

# Fit a GMF model with 3 latent factors
gmf = sgdgmf.fit(data$Y, ncomp = 3, family = poisson())

# Get the GMF deviance, AIC and BIC
deviance(gmf)
AIC(gmf)
BIC(gmf)


sgdGMF documentation built on June 8, 2025, 12:05 p.m.