Table-creating model summary package that supports unmarkedFit class?

48 views
Skip to first unread message

Vegas Rockafeller

unread,
Feb 25, 2025, 5:48:55 PMFeb 25
to unmarked
Hi all, 

I want to make a publication-quality table to display the beta estimates and standard errors for my model covariates. I have abundance and occupancy models for five and 25 bird species, respectively, and would like to display the above information in two tables, one for the abundance species and one for the occupancy species. However, I have encountered some issues finding a model summary package that supports UnmarkedFitPCount and UnmarkedFitOccu. 

Does anyone know of any table-creating model summary packages that currently support unmarkedFit classes? I'm sure I can do this by hand relatively easily, but it would be awesome if there was a package out there to help! Thanks a ton in advance for your help!


Ken Kellner

unread,
Feb 25, 2025, 5:51:55 PMFeb 25
to unma...@googlegroups.com
I don't know of any packages that explicitly support unmarked for table formatting.

A while back I wrote some quick methods for using the broom and huxtable packages with unmarked output, but never got around to testing them thoroughly and adding them to the package. I've attached the code for these methods with an example, in case they are helpful.

Ken
> --
> *** Three hierarchical modeling email lists ***
> (1) unmarked (this list): for questions specific to the R package unmarked
> (2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
> (3) HMecology: for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2016, 2021) and Schaub & Kéry (2022)
> ---
> 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.
> To view this discussion visit https://groups.google.com/d/msgid/unmarked/32587294-ea8c-47b1-9f80-1a63b1676821n%40googlegroups.com.

unm_tables.R

Marc J. Mazerolle

unread,
Feb 25, 2025, 9:24:35 PMFeb 25
to unma...@googlegroups.com
Hi Vegas,

Another option is to use xtable methods from the AICcmodavg package to
format the output to LaTeX using the xtable package.

Here is an example for an N-mixture model from ?pcount:

library(unmarked)
library(AICcmodavg)
library(xtable) #to export table to LaTeX

##format object
data(mallard)
mallardUMF <- unmarkedFramePCount(mallard.y, siteCovs = mallard.site,
obsCovs = mallard.obs)
fm.mallard <- pcount(~ ivel+ date + I(date^2) ~ length + elev + forest,
mallardUMF, K=30)

##summary of model
out <- summaryOD(fm.mallard, c.hat = 1)
out

##formatted as LaTeX table
xtable(out)

?summaryOD
?xtable.aictab

Best,

Marc
--
____________________________________
Marc J. Mazerolle
Professeur titulaire et directeur du bac. en environnements naturels et
aménagés
Département des sciences du bois et de la forêt
2405 rue de la Terrasse
Université Laval
Québec, Québec G1V 0A6, Canada
Tel: (418) 656-2131 ext. 407120
Email: marc.ma...@sbf.ulaval.ca


-------- Message initial --------
De: Vegas Rockafeller <vrocka...@gmail.com>
Répondre à: unma...@googlegroups.com
À: unmarked <unma...@googlegroups.com>
Objet: [unmarked] Table-creating model summary package that supports
unmarkedFit class?
Date: 2025-02-25 12:21:16

Vegas Rockafeller

unread,
Feb 27, 2025, 4:54:30 PMFeb 27
to unmarked
Hi Ken and Marc,

Thank you both so much!

Best,
Vegas

Reply all
Reply to author
Forward
0 new messages