3
$\begingroup$

Given the following code:

df<-structure(list(N = c(97L, 97L, 90L, 111L, 108L, 83L, 72L, 107L, 
156L, 159L, 92L, 72L, 228L, 115L, 182L, 216L, 233L, 167L, 93L, 
204L, 55L, 185L, 163L, 65L, 103L, 107L, 182L, 293L, 91L, 52L, 
176L, 110L, 113L, 225L, 119L, 132L), x = c(46.7228252110461, 
46.6819871518318, 47.270241844776, 47.9898485462862, 47.8396257393914, 
47.796127088125, 47.57147041175, 48.1588702768176, 48.5000199350821, 
49, 48.5000968372371, 48.5753856028303, 49.312918878543, 48.3968587440564, 
49.0777317648583, 48.3057829872496, 48.0700449039265, 48.5510457147943, 
48.5829394151059, 50.0083191998552, 47.6813628201493, 49.3598781549173, 
50.539012213558, 49.5089784216086, 49.1222148031355, 48.7737067042595, 
49.3737319261229, 49.7938972671776, 49.5780549528089, 48.5000035215272, 
49.5, 49.0954381376657, 49.5358040507565, 48.989997312362, 49.5, 
48.0694101885463)), class = "data.frame", row.names = c(NA, -36L
))

lm_g<-glm(N~x,df,family=gaussian())
lm_p<-glm(N~x,df,family=poisson())

print( paste("Gaussian model better?", AIC(lm_g)<AIC(lm_p) ) )

Why is the AIC of the gaussian model better than the one of the poisson model even though the variable N is count data?

$\endgroup$

1 Answer 1

4
$\begingroup$

The AIC depends on the likelihood of the distribution. As such, you cannot directly compare these models.

A feasible way to do so is to

  1. specify a relevant scoring function for your problem, e.g. mean Poisson deviance
  2. estimate its value using (cross-)validation
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.