Is Unmarked calculating AICc or AIC?

1,123 views
Skip to first unread message

Chad Hockenbary

unread,
Mar 3, 2011, 12:49:40 PM3/3/11
to unmarked, rot...@montana.edu
Hi. I decided to run my single-species, multi-season occupancy models
in Unmarked after running them in a different software package. I
think the Unmarked package is a lot easier to work in, but after
running the models in Unmarked, I noticed Unmarked is calculating AICc
not AIC. I looked at previous threads on the google group, and I did
not notice any resolution on this issue. It’s not a big deal, I can
calculate either AICc or AIC given the -2log and number of parameters.
But what is it calculating; the output calls it AIC?
The example below is from when I run a constant model and a “habitat”
model with n=47. Notice that 261.5+(2*4) does not equal 270.5 (it
equals 269.5) but when we account for the 47 sites and calculate AICc,
261.5+2*4(47/(47-4-1) , we get 270.452380… which is very similar to
the AIC value in the table. This is even clearer when there are more
parameters (habitat model). I have double checked this table to model@
AIC and I get the same results.

Model Converge -2logLik K
AIC DeltaAIC w
1 ~habitat , ~habitat , ~habitat , ~1 0 -249.8 7
266.7 0.0 0.869
2 ~1 , ~1 , ~1 , ~1 0 -261.5 4
270.5 3.8 0.131


Chad Hockenbary
GRA
Montana State University

Richard Chandler

unread,
Mar 3, 2011, 1:22:31 PM3/3/11
to unma...@googlegroups.com
Hi Chad,

Glad to hear that you like unmarked. And thanks for noticing this mistake in colext. If you look at line 54 of the the source code, you see:
fmAIC <- 2 * opt$value + 2 * nP + 2*nP*(nP + 1)/(M - nP - 1)

which I guess is AICc assuming that the sample size is equal to the number of sites. I will fix this so that it returns AIC to be
consistent with the other fitting functions. In the meantime, note that you can get the log likelihood by typing:

logLik(someModel)


Richard


Travis Gallo

unread,
Jan 14, 2015, 5:58:05 PM1/14/15
to unma...@googlegroups.com
Hi Richard,

I am bringing back up an old thread, but I noticed in the source code that AIC for colext() is now calculating AIC and not AICc (per Chad's comment) and I know that I can calculate AICc by hand, but one suggestion to add to your already large to-do list would be to give the option of picking what type of model selection criteria to use (AIC vs. AICc). Based on Anderson's suggestion of using AICc in practice I would think a lot of people would like the option of using it conveniently within colext() and unmarked.

I may have missed this option and if I did I am sorry.

Thanks for the hard work you put into unmarked. Its a great package and the reason I suggest this idea is that I really like the modSel() function and being able to export the tables so quickly. Super convenient!

Cheers.

Travis Gallo
Ph.D. Candidate
Sustainability Leadership Fellow - School of Global Environmental Sustainability
Department of Fish, Wildlife and Conservation Biology
Colorado State University

Jeffrey Royle

unread,
Jan 14, 2015, 6:23:46 PM1/14/15
to unma...@googlegroups.com
hi Travis,
 I'm not sure it makes sense to give an AICc option simply because it's not clear what the sample size is for these models. Number of sites or total number of observations?
andy


--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Giancarlo Sadoti

unread,
Jan 14, 2015, 8:54:37 PM1/14/15
to unma...@googlegroups.com
Travis, if you use Marc M.'s AICcmodavg package, you can set the number if observations from which AICc is calculated from colext and other models. HTH, Giancarlo

Travis Gallo

unread,
Jan 15, 2015, 11:18:14 AM1/15/15
to unma...@googlegroups.com
Andy, that makes sense. Thanks for the response.

Giancarlo, I was using AICc.unmarked() and getting the AICc value for an individual model, but was trying to figure out a way to get AIC results for multiple models and a table similar to modSel in unmarked just with AICc. There may be a way to do this and I just haven't figured it out. I'll keep digging. Thanks or your response.

Travis 

Marc J. Mazerolle

unread,
Jan 15, 2015, 11:37:47 AM1/15/15
to unma...@googlegroups.com
Travis,

Defining the sample size for occupancy-type models is not
straightforward.

In AICcmodavg, if you want AICc for unmarkedFit models, it uses the
number of sites as the sample size:

AICc(mod, second.order = TRUE, nobs = NULL) returns AICc using the
number of sites as sample size. You may change it to another value if
you prefer by specifying it in the "nobs" argument.

You can get "classic" AIC like so:
AICc(mod, second.order = FALSE) returns AIC.

Note that "second.order" and "nobs" arguments are also present in the
model selection and multimodel inference functions of the package. For
instance, see ?aictab, ?modavgPred, ?modavg, for examples of their use.

Best,

Marc
--
____________________________________
Marc J. Mazerolle
Centre d'étude de la forêt
Université du Québec en Abitibi-Témiscamingue
445 boulevard de l'Université
Rouyn-Noranda, Québec J9X 5E4, Canada
Tel: (819) 762-0971 ext. 2458
Email: marc.ma...@uqat.ca


-------- Message initial --------
De: Travis Gallo <htravi...@gmail.com>
À: unma...@googlegroups.com
Sujet: Re: [unmarked] Is Unmarked calculating AICc or AIC?
Date: Thu, 15 Jan 2015 08:18:14 -0800

Travis Gallo

unread,
Jan 15, 2015, 4:48:37 PM1/15/15
to unma...@googlegroups.com, marc.ma...@uqat.ca
Thanks for your helpful response, Marc.

Kita Ashman

unread,
Jun 28, 2019, 9:23:28 PM6/28/19
to unmarked
Hi Richard,

Just hoping to get some clarity on whether all functions in unmarked are now calculating AIC or AICc? I've run a few generalized multinomial N-mixture models in unmarked using gmultmix and have had a reviewer suggest I use AICc instead of AIC, so was just hoping to double check that this function is indeed calculating AIC's not AICc's before recalculating/converting my 'AIC' values.

Hope that makes sense and thanks a bunch for your help,

Cheers!

Kita
Reply all
Reply to author
Forward
0 new messages