Plotting Local Extinction and Colonization

posts related to the RPresence library, which may not be of general interest to users of 'classic' PRESENCE.

Plotting Local Extinction and Colonization

Postby Lombardijv » Tue Apr 10, 2018 11:35 pm

Hi all,

I attended the Proteus workshop in spring 2017 and was given the code for multi-season occupancy analyses in R-Presence. I am trying to plot local extinction as per reviewer's request for a manuscript revision.

In the code, we were showed how to plot occupancy (in this case initial occupancy) but there was no example code on how to plot localized extinction or colonization. I have no issue plotting occupancy (psi) and adding confidence intervals to the plot, but I am a bit lost when it comes to plotting localized extinction.

The code for occupancy looks like this
# plot estimated occupancy vs elevation

plot(x=mydata$unitcov$outcrop,y=m1$real$psi$est,
ylim=c(0,1), pch=16,
xlab="Distance to Outcrops",
ylab="Estimated occupancy probability")
col=mydata$unitcov$outcrop,
li=m1$real$psi$lower_0.95,
ui=m1$real$psi$upper_0.95,
sfrac=0,gap=0)

How would I adapt this for localized extinction? I have hit a wall, I am sure I am overthinking all of this but any help would be much appreciated it.
Lombardijv
 
Posts: 9
Joined: Mon Mar 17, 2014 1:07 pm

Re: Plotting Local Extinction and Colonization

Postby jhines » Wed Apr 11, 2018 7:46 am

Hi,

From the code you listed, it appears that you are using the Skinks example data. There are 5 seasons, or 4 intervals between seasons for extinction to occur. So, potentially you could have 4 extinction plots. The first 1:nunits are the estimates for extinction between seasons 1 and 2. To plot the first season extinction estimates, here is the code:

plot(x=mydata$unitcov$outcrop,y=m1$real$epsilon$est[1:mydata$nunits],
ylim=c(0,1), pch=16,
xlab="Distance to Outcrops",
ylab="Estimated extinction before season 2")
col=mydata$unitcov$outcrop,
li=m1$real$psi$lower_0.95,
ui=m1$real$psi$upper_0.95,
sfrac=0,gap=0)

The next 1:nunits epsilon estimates are the extinction estimates between seasons 2 and 3. To plot those extinction estimates, the code would be:

plot(x=mydata$unitcov$outcrop,y=m1$real$epsilon$est[mydata$nunits+1:mydata$nunits],
ylim=c(0,1), pch=16,
xlab="Distance to Outcrops",
ylab="Estimated extinction before season 3")
col=mydata$unitcov$outcrop,
li=m1$real$psi$lower_0.95,
ui=m1$real$psi$upper_0.95,
sfrac=0,gap=0)
jhines
 
Posts: 599
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA


Return to RPresence

Who is online

Users browsing this forum: No registered users and 12 guests