Thanks Murray. You helped me resolve the majority of my issues. Before I get into my followup questions, to answer your question, these turtles mostly concentrate their activity in specific parts of the pond, but these aggregations shift seasonally. I hypothesize that these shifts are in response to biological conditions (breeding, nesting, etc.) as well as changing environmental conditions (vegetation growth, etc.). Finally, movement between ponds has been recorded, but is not that common in the time scale of a year of two.
I now have calculated density and population estimates for 5 of my 7 focus ponds (plus a metapopulation grouping of 3 of the ponds together) as well as corresponding density surfaces. However, 2 of my ponds are giving me an issue (density appears to be constant throughout the entire mask).
This script I have included below is the basic script-template I use for all of my sites, so if you see anything that is not right, please let me know as I will need to fix this on the others.
Finally, the last aspect of the spatial analysis I want to calculate is the effect habitat covariates have on detection and density. I have chosen to omit these questions (for now), however I wonder if you recommend I ask you these in this post OR create a new post for the sake of keeping topics organized? This will be the final set of questions I have. Thanks again for all your help so far!
library(secr)
library(maptools)
#setwd(Users/Niko/Documents/PSRU Project/PSRU 2015/Thesis/4. Population Chapter/secr_data)
gspCH <- read.capthist('gsp_captures.txt','gsp_detectors1.txt',detector = 'proximity',
fmt = c("trapID", "XY"), noccasions = NULL, covnames = NULL, trapcovnames = NULL, cutval = NULL, verify = TRUE, noncapt = "NONE")
summary(gspCH)
gspPoly<-readShapePoly("gsp_pond.shp")
plot(gspPoly)
#here I am trying to play with different mask settings to see if one will work...
gspMASKpoly<-make.mask(traps(gspCH),spacing = 100,
type = "polygon", poly = gspPoly, poly.habitat = TRUE)
gspMASKpoly50<-make.mask(traps(gspCH),spacing = 50,
type = "polygon", poly = gspPoly, poly.habitat = TRUE)
gspMASK100<-make.mask(traps(gspCH),spacing = NULL,
buffer = 100, type = "trapbuffer", poly = gspMASK1)
gspMASK500<-make.mask(traps(gspCH),spacing = NULL,
buffer = 500, type = "trapbuffer", poly = gspMASK1)
gsp_secr100poly <- secr.fit(gspCH, mask = 'gspMASKpoly',model = g0 ~ 1, trace = TRUE, verify = TRUE)
gsp_secr50poly <- secr.fit(gspCH, mask = 'gspMASKpoly50',model = g0 ~ 1, trace = TRUE, verify = TRUE)
gsp_secr100 <- secr.fit(gspCH, mask = 'gspMASK100',model = g0 ~ 1, trace = TRUE, verify = TRUE)
gsp_secr500 <- secr.fit(gspCH, mask = 'gspMASK500',model = g0 ~ 1, trace = TRUE, verify = TRUE)
AIC(gsp_secr100poly,gsp_secr50poly)
# WHICH AIC Value is lowest? Neither, so I will use 'sp_secr50poly' becuase it
#extends the area to the whole pond.
#density estimate:
predict(gsp_secr50poly)
#population estimate:
gspRegion50<-region.N(gsp_secr50poly,region = NULL, spacing = NULL, session = NULL,group = NULL, se.N = TRUE, alpha = 0.05, loginterval = TRUE,
keep.region = FALSE, nlowerbound = TRUE, RN.method = "poisson",pooled.RN = FALSE)
gspRegion50
#Perdictive surface density plot:
tmp <- fx.total(gsp_secr50poly)
## to plot we must name one of the covariates:
## the Dsurface default D.0 causes an error
plot(tmp,covariate = 'D.sum', col=terrain.colors(16), plottype='shaded')
plot(tmp, covariate = 'D.sum', col = 'white', add = TRUE, plottype = 'contour')
spotHeight(tmp,prefix = 'D.sum')
fxsurface <- fx.total(gsp_secr1, sessnum = 1,mask=NULL)
plot(fxsurface, covariate = 'D.sum')
#I cannot seem to get the surface density to work for this pond...