1

I have fitted the normal distributions to my claim amount data using the fitdistr in R. How do i fit Multivariate normal distribution (Two dimensional normal distribution) ? I want to choose which one fits my sample data the best using the AIC in R. How do I proceed? I have tried

IC<-Mclust(data,G=1) 
IC1<-Mclust(data,G=2)

smaller BIC is better model. but how to calculate AIC base on this Mclust result.

merv
  • 67,214
  • 13
  • 180
  • 245
harry
  • 11
  • 4

1 Answers1

2

The Akaike Information Criterion (AIC) is defined as 2*k - 2*ln(L), where k is the number of parameters in a model and L is the likelihood of the model (maximized for the data by fitting the best parameters).

Mclust() returns both of these to you, so you can compute AICs from fields in the returned Mclust objects.

require(mclust)
data(iris)
IC <- Mclust(data=iris, G=1)
IC1 <- Mclust(data=iris, G=2)
aic <- 2*IC$df - 2*IC$loglik
aic1 <- 2*IC1$df - 2*IC1$loglik

Do ?Mclust for more information.

Curt F.
  • 4,690
  • 2
  • 22
  • 39