Plotting density/covariate relationship

92 views
Skip to first unread message

samant...@gmail.com

unread,
Aug 19, 2018, 4:52:11 PM8/19/18
to secr
Hello,
Is there a way in secr to plot a graph of the relationship between density and a covariate? I would like to look at the relationship between different habitat values/rankings and density. I have some code from another source for this but I can't seem to be able to alter it correctly for my secr data. My top model includes both habitat ranking and wildfire ranking, and am looking to plot them both separately to see how the density of my species changes with these covariates.

I've attached my model that I am looking to plot (exp.burn.bio.g0t.10km) and the mask I used (wsar_10km_mask). Not sure if I should attach anything else here, but if so, let me know.

As an example, I'm trying to make graphs like these two below.

Capture.PNG


exp.burn.bio.g0t.10km.Rdata
wsar_10km_mask.Rdata

Murray Efford

unread,
Aug 20, 2018, 8:28:12 AM8/20/18
to secr
You can't produce these plots automatically, but it should be straightforward to generate and plot predictions of density for a range of values of the covariate (specify the newdata argument of predict).

One example is under 'Regression splines' in https://www.otago.ac.nz/density/pdfs/secr-densitysurfaces.pdf. For the shaded confidence region you can construct a polygon boundary from the lcl and ucl values and plot that underneath with polygon().
Reply all
Reply to author
Forward
0 new messages