Fixed detection parameters in a Multistrata model

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Fixed detection parameters in a Multistrata model

Postby TLWilson » Tue Jan 08, 2013 9:51 pm

Hi all,

I am trying to fit the model from Sauer et al. 2011. JWM 75(3):509-512 to some Bald eagle nest data from southcentral Alaska. I have a dataset with 2 states: A = occupied nest and B = unoccupied nest (changed from O and U) and 4 yearly nest visits. I was able to enter the data and run simple models successfully. My problem occurs when I try to fix detection of unoccupied nests equal to zero, as suggested on page 511: "We estimate detection probability for an occupied nest in year t (p_t^A), but because unoccupied nests cannot be unambiguously identified from the air, we set p_t^B = 0".

The relevant RMark code is below. You will noticed that I borrowed heavily from the example listed in appendix C.
Code: Select all
# Read data. Use colClasses to keep leading zeros
d1 <- read.table('Z:/5Tammy/BAEA/analyses/MSMR2012/2012_BAEA_KEFJ_MSMR_sum.txt',
colClasses =c("character","numeric"), sep = "\t", header = TRUE)
# Process Data
mstrata.processed <- process.data(data = d1, model = "Multistrata")
# Create design data
mstrata.ddl=make.design.data(mstrata.processed)
# Define range of models for S
S.=list(formula=~1)
#  Define range of models for p
p.=list(formula=~1)
    # returns index  numbers
    p.stratum.B<-as.numeric(row.names(d1.ddl$p[mstrata.ddl$p$stratum=="B",]))
    # Fixes p for unoccupied nests. IS THIS RIGHT???
    p.stratum=list(formula=~stratum, fixed=list(index = p.stratum.B, value = c(rep(0,length(p.stratum.B)))))
# Define range of models for Psi
Psi.s=list(formula=~-1+stratum:tostratum)
# Create model list and run assortment of models
model.list=create.model.list("Multistrata")
#Run the list
mstrata.results=mark.wrapper(model.list,data=mstrata.processed,mstratum=d1.ddl, threads=2)


The code above runs, and the first model (p.) looks good. However, the second model (with the fixed p) doesn't seem to converge, and had unreasonable estimates for the transition parameters. I went through several examples and read through the literature on the subject, but am a bit confused about how to code it. Any suggestions?

Thanks!
Tammy
TLWilson
 
Posts: 3
Joined: Tue Jan 08, 2013 8:20 pm

Re: Fixed detection parameters in a Multistrata model

Postby jlaake » Tue Jan 08, 2013 10:00 pm

Tammy

I don't think the code you put in the posting could have worked. For example, mstratum is not an argument to mark or mark.wrapper. Also, you are swapping back and forth between mstrata.ddl and d1.ddl. I think if you clean up the syntax problems it should work. You are on the right track.

--jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Fixed detection parameters in a Multistrata model

Postby TLWilson » Wed Jan 09, 2013 2:19 pm

Hi Jeff,

Thank you for your quick response. I apologize for posting the code with errors. The code I posted was written after an attempt to wrap the whole thing up in a function with standardized object names. I didn't notice the syntax errors because mstrata.ddl and d1.ddl were identical objects! :oops:

I fixed the syntax errors, restarted R, deleted all objects and temporary files, and tried again. I am still getting the same results.

Code: Select all
# S..p.stratum.fixed.Psi.s
#STOP NORMAL EXIT
#
#Output summary for Multistrata model
#Name : S(~1)p(~stratum)Psi(~-1 + stratum:tostratum)
#
#Npar :  4
#-2lnL:  60952.53
#AICc :  60960.8
#
#Beta
#                          estimate          se         lcl        ucl
#S:(Intercept)            13.033552 184.9535100 -349.475340 375.542440
#p:(Intercept)             2.277323   0.5251043    1.248119   3.306528
#p:stratumB                0.000000   0.0000000    0.000000   0.000000
#Psi:stratumB:tostratumA   1.020290   1.5509905   -2.019652   4.060231
#Psi:stratumA:tostratumB -12.598796 248.3129200 -499.292130 474.094540


The reason I didn't think it worked was that Sauer et al. reported similar values of Phi for A:B, and B:A, but I didn't get that when I ran the model. The more I think about it, though, it seems like if state B is not observable, then you would expect the probability of transitioning from state A to state B would be pretty low. If the way the zeros were fixed is correct, then I will report that the Sauer et al. model was a poor fit for our data, and use a standard formulation of p.stratum.

Best wishes,
Tammy
TLWilson
 
Posts: 3
Joined: Tue Jan 08, 2013 8:20 pm

Re: Fixed detection parameters in a Multistrata model

Postby jlaake » Wed Jan 09, 2013 2:31 pm

Tammy-

I'm not familiar with the article you mention, but from what you described I wonder whether this is the correct approach for this analysis. This sounds more like occupancy modelling or possibly state uncertainty as in the recent Ecology ms by Kendall et al, but I don't know all the details. If you want send me the article in an email offlist and a more complete description of what you are doing.

regards --jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to RMark

Who is online

Users browsing this forum: No registered users and 2 guests