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.