cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-239588%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3Epositive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239588%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20noticed%20that%20JMP%20invariably%20reports%20positive%20LLs%20and%20negative%20AICs%2C%20for%20example%20%22-2LL%20%3D%20-1406.88%22%20or%20%22AICc%20%3D%26nbsp%3B%26nbsp%3B-1451.534%22.%20This%20does%20not%20make%20sense%2C%20does%20it%3F%20LL%20must%20be%20negative%20by%20definition%3B%20AIC%20can%20in%20principle%20be%20negative%2C%20but%20with%20low%20LLs%20and%20low%20number%20of%20parameters%20it%20usually%20is%20positive.%3C%2FP%3E%3CP%3EAm%20I%20missing%20something%20fundamental%20here%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-272237%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-272237%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EPlease%20do%20not%20delete%20this%20post.%20This%20discuss%20is%20useful%20to%20other%20users%20who%20might%20have%20trouble%20finding%20-2L%2C%20too.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-272232%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-272232%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EThis%20was%20in%20JMP%2010.%20I%20think%20it%20is%20different%20on%20JMP%2014%2C%20can%20check.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-272190%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-272190%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20please%20explain%20where%20the%20-2LL%20are%20reported%3F%20I'm%20only%20seeing%20final%20AICc%20values%20on%20my%20end.%20I'm%20in%20JMP%2014.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUPDATE%3A%20Never%20mind%2C%20I%20figured%20it%20out%20(I%20needed%20to%20do%20a%20GLM)%20and%20now%20I%20can't%20figure%20out%20how%20to%20delete%20this%20post.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239847%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239847%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EIt%20is%20from%20a%20MLE%20procedure.%20The%20estimation%20minimizes%20-2L.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes%2C%20you%20can%20use%20twice%20the%20difference%20between%20the%20log%20likelihood%20under%20the%20null%20and%20the%20alternative%20hypotheses%20for%20a%20LRT%20chi%20square%20test.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239812%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239812%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EAhh%2C%20got%20it.%20This%20LL%20is%20not%20from%20a%20ML%20procedure.%20Then%20my%20last%20question%3A%20can%20I%20still%20use%20these%20values%20in%20a%20log-ratio%20test%20or%20are%20they%20not%20good%20for%20that%3F%3CBR%20%2F%3EThanks%20for%20your%20help!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239811%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239811%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHere%20is%20the%20computation%20of%20AICc%20for%20a%20continuous%20response%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202019-12-27%20at%207.55.36%20AM.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-12-27%20at%207.55.36%20AM.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-12-27%20at%207.55.36%20AM.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20825i3249957C109A3239%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202019-12-27%20at%207.55.36%20AM.png%22%20alt%3D%22Screen%20Shot%202019-12-27%20at%207.55.36%20AM.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20first%20term%20is%20-2L.%20So%20if%20you%20have%20a%20small%20SSE%20(a%20good%20fit)%2C%20then%20-2L%20can%20be%20negative.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239794%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239794%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%3CSPAN%3EFull%20model%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E-LogLikelihood%20%3D%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B-1459.5116.%20I.e.%26nbsp%3BLogLikelihood%20%3D%26nbsp%3B1459.5116.%20%26gt%3B0.%20Cannot%20be.%20Either%20this%20is%20not%20LL%2C%20or%20it%20is%2C%20but%20there%20is%20a%20minus%20in%20there%20that%20should%20not%20be%20there.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOr%20I%20am%20missing%20something%20big%20way.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239613%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239613%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20don't%20see%20anything%20wrong%20with%20these%20results.%20If%20you%20are%20concerned%20about%20the%20negative%20AICc%2C%20that%20happens%20all%20the%20time.%20There%20really%20isn't%20any%20scale%20here.%20Smaller%20AICc%20always%20suggests%20a%20better%20model.%20So%20a%20model%20with%20AICc%20%3D%201000%20is%20better%20than%20a%20model%20with%20AICc%20%3D%201200.%20A%20model%20with%20AICc%20%3D%20-1250%20is%20better%20than%20a%20model%20with%20AICc%20%3D%20-1200.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239608%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239608%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EThanks!%20In%20the%20example%20you%20give%20everything%20is%20%22good%22.%20LL%20negative%20BIC%20and%20AIC%20positive.%20So%20it%20does%20not%20quite%20answer%20my%20question.%20I%20see%20how%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20should%20I%20assume%20that%20this%20is%20a%20type%20(minus%20should%20not%20be%20there%2C%20see%20lines%20marked%20with%20%26gt%3B%26gt%3B%26gt%3B%26gt%3B)%20in%20a%20report%20like%20this%3F%3CBR%20%2F%3E%3CBR%20%2F%3EGeneralized%20Linear%20Model%20Fit%3CBR%20%2F%3EOverdispersion%20parameter%20estimated%20by%20Maximum%20Likelihood%3CBR%20%2F%3EResponse%3A%20O2Cons_ugO2%2FmgWW%3CBR%20%2F%3EDistribution%3A%20Normal%3CBR%20%2F%3ELink%3A%20Identity%3CBR%20%2F%3EEstimation%20Method%3A%20Maximum%20Likelihood%3CBR%20%2F%3EObservations%20(or%20Sum%20Wgts)%20%3D%20369%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3ERegression%20Plot%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EWhole%20Model%20Test%3CBR%20%2F%3E%3CBR%20%2F%3E%26gt%3B%26gt%3B%26gt%3B%26gt%3BModel%20-LogLikelihood%20L-R%20ChiSquare%20DF%20Prob%26gt%3BChiSq%3CBR%20%2F%3E%26gt%3B%26gt%3B%26gt%3B%26gt%3BDifference%2060.566153%20121.1323%201%20%26lt%3B.0001%3CBR%20%2F%3E%26gt%3B%26gt%3B%26gt%3B%26gt%3BFull%20-1459.5116%3CBR%20%2F%3E%26gt%3B%26gt%3B%26gt%3B%26gt%3BReduced%20-1398.9455%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EGoodness%20Of%20Fit%20Statistic%20ChiSquare%20DF%20Prob%26gt%3BChiSq%20Overdispersion%3CBR%20%2F%3EPearson%200.0079%20367%201.0000%200.0000%3CBR%20%2F%3EDeviance%200.0079%20367%201.0000%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAICc%3CBR%20%2F%3E-2912.958%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EEffect%20Tests%3CBR%20%2F%3E%3CBR%20%2F%3ESource%20DF%20L-R%20ChiSquare%20Prob%26gt%3BChiSq%3CBR%20%2F%3EassayT%201%20121.13231%20%26lt%3B.0001%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EParameter%20Estimates%3CBR%20%2F%3E%3CBR%20%2F%3ETerm%20Estimate%20Std%20Error%20L-R%20ChiSquare%20Prob%26gt%3BChiSq%20Lower%20CL%20Upper%20CL%3CBR%20%2F%3EIntercept%200.001544%200.0007616%204.0872942%200.0432%200.0000474%200.0030406%3CBR%20%2F%3EassayT%200.0003546%200.0000296%20121.13231%20%26lt%3B.0001%200.0002964%200.0004127%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EStudentized%20Deviance%20Residual%20by%20Predicted%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-239602%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20positive%20loglikelihoods%20and%20negative%20AIC's%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-239602%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EYou%20may%20have%20not%20seen%20exceptions%20but%20they%20can%20happen.%20You%20are%20correct%20that%20the%20log-likelihood%20is%20always%20negative%20because%20the%20likelihood%20is%20always%200%20to%201.%20Similarly%2C%20the%20-2L%20is%20always%20positive.%20AICc%2C%20though%2C%20can%20be%20negative%20or%20positive.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20example%2C%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screen%20Shot%202019-12-23%20at%2011.00.22%20AM.png%22%20style%3D%22width%3A%20555px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-12-23%20at%2011.00.22%20AM.png%22%20style%3D%22width%3A%20555px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screen%20Shot%202019-12-23%20at%2011.00.22%20AM.png%22%20style%3D%22width%3A%20555px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F20785iA73F363EE37D46B0%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screen%20Shot%202019-12-23%20at%2011.00.22%20AM.png%22%20alt%3D%22Screen%20Shot%202019-12-23%20at%2011.00.22%20AM.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
l_yampolsky
Level III

positive loglikelihoods and negative AIC's

I noticed that JMP invariably reports positive LLs and negative AICs, for example "-2LL = -1406.88" or "AICc =  -1451.534". This does not make sense, does it? LL must be negative by definition; AIC can in principle be negative, but with low LLs and low number of parameters it usually is positive.

Am I missing something fundamental here?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: positive loglikelihoods and negative AIC's

It is from a MLE procedure. The estimation minimizes -2L.

 

Yes, you can use twice the difference between the log likelihood under the null and the alternative hypotheses for a LRT chi square test.

View solution in original post

10 REPLIES 10

Re: positive loglikelihoods and negative AIC's

You may have not seen exceptions but they can happen. You are correct that the log-likelihood is always negative because the likelihood is always 0 to 1. Similarly, the -2L is always positive. AICc, though, can be negative or positive.

 

For example,

Screen Shot 2019-12-23 at 11.00.22 AM.png

 

 

l_yampolsky
Level III

Re: positive loglikelihoods and negative AIC's

Thanks! In the example you give everything is "good". LL negative BIC and AIC positive. So it does not quite answer my question. I see how

So should I assume that this is a type (minus should not be there, see lines marked with >>>>) in a report like this?

Generalized Linear Model Fit
Overdispersion parameter estimated by Maximum Likelihood
Response: O2Cons_ugO2/mgWW
Distribution: Normal
Link: Identity
Estimation Method: Maximum Likelihood
Observations (or Sum Wgts) = 369


Regression Plot



Whole Model Test

>>>>Model -LogLikelihood L-R ChiSquare DF Prob>ChiSq
>>>>Difference 60.566153 121.1323 1 <.0001
>>>>Full -1459.5116
>>>>Reduced -1398.9455



Goodness Of Fit Statistic ChiSquare DF Prob>ChiSq Overdispersion
Pearson 0.0079 367 1.0000 0.0000
Deviance 0.0079 367 1.0000



AICc
-2912.958





Effect Tests

Source DF L-R ChiSquare Prob>ChiSq
assayT 1 121.13231 <.0001




Parameter Estimates

Term Estimate Std Error L-R ChiSquare Prob>ChiSq Lower CL Upper CL
Intercept 0.001544 0.0007616 4.0872942 0.0432 0.0000474 0.0030406
assayT 0.0003546 0.0000296 121.13231 <.0001 0.0002964 0.0004127




Studentized Deviance Residual by Predicted

Re: positive loglikelihoods and negative AIC's

I don't see anything wrong with these results. If you are concerned about the negative AICc, that happens all the time. There really isn't any scale here. Smaller AICc always suggests a better model. So a model with AICc = 1000 is better than a model with AICc = 1200. A model with AICc = -1250 is better than a model with AICc = -1200.

l_yampolsky
Level III

Re: positive loglikelihoods and negative AIC's

Full model -LogLikelihood = -1459.5116. I.e. LogLikelihood = 1459.5116. >0. Cannot be. Either this is not LL, or it is, but there is a minus in there that should not be there. 

Or I am missing something big way.

 

Thanks

Re: positive loglikelihoods and negative AIC's

Here is the computation of AICc for a continuous response:

 

Screen Shot 2019-12-27 at 7.55.36 AM.png

 

The first term is -2L. So if you have a small SSE (a good fit), then -2L can be negative.

l_yampolsky
Level III

Re: positive loglikelihoods and negative AIC's

Ahh, got it. This LL is not from a ML procedure. Then my last question: can I still use these values in a log-ratio test or are they not good for that?
Thanks for your help!

Re: positive loglikelihoods and negative AIC's

It is from a MLE procedure. The estimation minimizes -2L.

 

Yes, you can use twice the difference between the log likelihood under the null and the alternative hypotheses for a LRT chi square test.

juneshres
Level II

Re: positive loglikelihoods and negative AIC's

Hi, 

 

Can you please explain where the -2LL are reported? I'm only seeing final AICc values on my end. I'm in JMP 14.

 

UPDATE: Never mind, I figured it out (I needed to do a GLM) and now I can't figure out how to delete this post. 

l_yampolsky
Level III

Re: positive loglikelihoods and negative AIC's

This was in JMP 10. I think it is different on JMP 14, can check.

Recommended Articles