problems with multistrata and POPAN models in RMark

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

problems with multistrata and POPAN models in RMark

Postby shelly » Mon Sep 28, 2009 8:39 pm

I have a few questions regarding some problems that I have recently encountered when attempting to fit a multistrata and POPAN models in Rmark.

Q1. The multistrata model I’m using has 3 states, and 12 occasions (11 intervals) spanning ~ 4 years.
I originally specified in decimal years and left age.unit=1:

Code: Select all
MS.processed<-process.data(MS, model="Multistrata", groups=("sex"),
              begin.time=1, initial.ages=c(1,1),age.unit=1,
              time.intervals= c(0.333,0.333,0.667,0.167,0.417,0.417,
              0.167,0.083,0.333,0.417,0.167))

MS.ddl<-make.design.data(MS.processed, parameters=list(Psi=list
                                (subtract.stratum=c("A", "B", "A"))))


But when I went to run a model (any model) I got the following error message:

#time.intervals=c(0.333,0.333,0.667,0.167,0.417,0.417,0.167,0.083,0.333,0.417,0.167)
#Error in `row.names<-.data.frame`(`*tmp*`, value = c("S:(Intercept)", : duplicate 'row.names' are not allowed
#In addition: Warning message:non-unique values when setting 'row.names': ‘p:A:time2.917’, ‘p:A:time3.334’

However, when I changed the time intervals to be in months and therefore the age.unit to be in months as well (as shown below) everything was fine and all of the models ran perfectly.

Code: Select all
MS.processed<-process.data(MS, model="Multistrata", groups=("sex"),
              begin.time=1, initial.ages=c(1,1),age.unit=1/12,
              time.intervals=c(4,4,8,2,5,5,2,1,4,5,2))


What is going on here?

Q2. This question applies to the exact same model shown above. If I ignore sex in the datafile (i.e. use a datafile that has no grouping variables) and specify the model with months and age.unit in months then for some reason it doesn’t work. That is when I type >summary(MS.processed) and look at what RMark thinks is the age.unit it shows
$age.unit = 1

It only registers $age.unit=0.0833 when I use a dataset that has grouping variables!

Why is this?

Q3. Finally regarding POPAN models: I was wondering where you find the estimates of N-hat? If I try to get the derived estimates of a particular model e.g. by typing >POPAN.results[[3]]$results) the output doesn't seem to include the derived estimates of N-hat only the B-hat derived estimates. But if I type >POPAN.results[[3]] I can see the N-hat estimates in the MARK notepad output. It would be nice to be able to access them directly from R so that I can use R plotting functions.
shelly
 
Posts: 10
Joined: Wed Feb 15, 2006 9:12 pm
Location: University of Queensland

Postby jlaake » Mon Sep 28, 2009 9:38 pm

Q1: You'll have to send me the input file/code so I can check. I did make a change to this portion of the code a couple of versions ago. If you are using remove.unused=T that could be the problem. Otherwise send me an example where it fails and I'll track it down.

Q2. Wouldn't have to be that way but in most cases where you are specifying an age.unit it is because you have a mix of animals of initial age, so you would have a grouping variable that would be for age and an optional age.unit. I can look at changing that requirement,

Q3. This is on my list of things to do. I'll need to work with Gary on this. I get those derived parameters like N (through time) from the binary file (.vcv) which is not a readable format so it isn't always easy for me to work out the issue. As you note, I could grab them from the text output file and I may resort to that if I can't work out the problem.

Did you resolve the issue we discussed off-list? Can't remenber where we left it regards --jeff[/quote]
jlaake
 
Posts: 1479
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