RdR
2012-Feb-22 09:45 UTC
[R] gamlss results for EXP and LNO seem to have reversed AIC scores
Hi, I'm a bit puzzled by the gamlss fitting of exponential and lognormal data. Gamlss seems to think that exponentially distributed data fits better with a lognormal distribution, and vice versa. For example, X <- rexp(1000) Gexp <- gamlss(X~1,family=EXP) # X~1 is X tilde 1 GAMLSS-RS iteration 1: Global Deviance = 2037.825 GAMLSS-RS iteration 2: Global Deviance = 2037.825 Glno <- gamlss(X~1,family=LNO) GAMLSS-RS iteration 1: Global Deviance = 2185.763 GAMLSS-RS iteration 2: Global Deviance = 2185.763 Gexp$aic [1] 2039.825 Glno$aic [1] 2189.763 Can anybody shed light on why these results would occur? cheers, RdR -- View this message in context: http://r.789695.n4.nabble.com/gamlss-results-for-EXP-and-LNO-seem-to-have-reversed-AIC-scores-tp4409754p4409754.html Sent from the R help mailing list archive at Nabble.com.
Mikis Stasinopoulos
2012-Feb-23 12:10 UTC
[R] gamlss results for EXP and LNO seem to have reversed AIC scores
Dear Richard I think the results below are consistent set.seed(1020) # created from EXP X1 <- rEXP(1000) Gexp <- gamlss(X1~1,family=EXP) #GAMLSS-RS iteration 1: Global Deviance = 1999.762 #GAMLSS-RS iteration 2: Global Deviance = 1999.762 Glno <- gamlss(X1~1,family=LOGNO) #GAMLSS-RS iteration 1: Global Deviance = 2213.252 #GAMLSS-RS iteration 2: Global Deviance = 2213.252 GAIC(Gexp, Glno) # df AIC #Gexp 1 2001.762 #Glno 2 2217.252 # EXP best # create from LOGNO X2 <- rLOGNO(1000) Aexp <- gamlss(X2~1,family=EXP) #GAMLSS-RS iteration 1: Global Deviance = 2954.628 #GAMLSS-RS iteration 2: Global Deviance = 2954.628 Alno <- gamlss(X2~1,family=LOGNO) #GAMLSS-RS iteration 1: Global Deviance = 2796.725 3GAMLSS-RS iteration 2: Global Deviance = 2796.725 GAIC(Aexp, Alno) # df AIC #Alno 2 2800.725 #Aexp 1 2956.628 # LOGNO best Mikis Prof Mikis Stasinopoulos d.stasinopoulos at londonmet.ac.uk Companies Act 2006 : http://www.londonmet.ac.uk/companyinfo
RdR
2012-Feb-23 21:10 UTC
[R] gamlss results for EXP and LNO seem to have reversed AIC scores
Thank you. I was obviously mis-interpreting the AIC results. RdR -- View this message in context: http://r.789695.n4.nabble.com/gamlss-results-for-EXP-and-LNO-seem-to-have-reversed-AIC-scores-tp4413702p4415275.html Sent from the R help mailing list archive at Nabble.com.
rigbyr
2012-Mar-22 18:47 UTC
[R] gamlss results for EXP and LNO seem to have reversed AIC scores
Global Deviance = -2*fitted log likelihood, AIC = Global deviance +2*number of parameters Choocing distribution with the lowest AIC selects the exponential -- View this message in context: http://r.789695.n4.nabble.com/gamlss-results-for-EXP-and-LNO-seem-to-have-reversed-AIC-scores-tp4409754p4496500.html Sent from the R help mailing list archive at Nabble.com.