diagnose: Diagnostics for the model fit.

Description Usage Arguments Value Author(s) Examples

View source: R/printfns.R

Description

Provides diagnostics of the mixture model fit.

Usage

1
diagnose(results)

Arguments

results

An object of class "inarmix"

Value

An object of class "diagnose.inarmix" which is a list containing the following components

em.converged

An indication of whether or not the "EM algorithm" converged.

niter

The number of iterations for required for the EM algorithm to converge.

nclasses

The number of latent classes used in the model fit.

loglikhood

The values of the log-likelihood function at each EM iteration.

ConvMat

This is a matrix containing several pieces of information. The columns with GEE in the title indicate if the algorithms for updating the parameters within an EM iteration have converged. The column with l[i] just contains the log-likelihood value. The column with the title "||Psi^2||" gives the norm of the "global estimating equation" - this should be near zero if the algorithm converged.

Author(s)

Nicholas Henderson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
XX <- cbind(rep(1,9),c(0:8)/4)
colnames(XX) <- c("const","time")
coefs <- rbind(c(-.2,0),c(1.2,.3))
alpha <- c(.2,.2)
scale <- c(2,2)
mix.prop <- c(.8,.2)

testdat <- GenerateMixData(200,coefs,alpha,scale,mix.prop,XX)
testfit <- inarmix(y~time,nclasses=2,id=subject,data=testdat,maxiter=3)

diagnose(testfit)

inarmix documentation built on May 2, 2019, 5:11 a.m.

Related to diagnose in inarmix...