aic: AIC

View source: R/rccmSummary.R

aicR Documentation

AIC

Description

This function calculates the AIC value for the random covariance clustering model (RCCM)

Usage

aic(omegaks, omega0s, ws, x, lambda2)

Arguments

omegaks

p x p x K array of K number of estimated subject-level precision matrices.

omega0s

p x p x nclusts array of nclusts number of estimated cluster-level precision matrices.

ws

nclusts x K matrix of estimated cluster weights for each subject (weights).

x

List of K data matrices each of dimension n_k x p.

lambda2

Non-negative scalar value used as input to rccm function to obtain estimates.

Value

Numeric AIC value.

Examples

# Generate data
set.seed(1994)
myData <- rccSim(G = 2, clustSize = 10, p = 10, n = 100, overlap = 0.50, rho = 0.10)

# Analyze with RCCM
resultRccm <- rccm(x = myData$simDat, lambda1 = 20,
lambda2 = 325, lambda3 = 0.01, nclusts = 2)

# Calculate AIC
aic(omegaks = resultRccm$Omegas, omega0s = resultRccm$Omega0,
ws = resultRccm$weights, x = myData$simDat, lambda2 = 325)


dilernia/rccm documentation built on Sept. 25, 2022, 9:40 a.m.