Page 2 of 2

Re: Collared and non-collared animals

PostPosted: Thu Jul 16, 2015 2:52 pm
by egc
looking4lions wrote:I wanted to try an alternative approach for accounting for collared and non-collared animals by creating dummy variables for the years where lions were found without collars (1997 and 1998) and years where lions were found with the assistance of collars (rest of the study period), as in these years the capture probability will be close to one.

I have tried to do this as follows:
lions.ddl$p$nocollar=0
lions.ddl$p$nocollar[lions.ddl$p$nocollar$time==1997 | lions.ddl$p$nocllar$time==1998]=1

but keep getting the error message:
Error in lions.ddl$p$nocollar$time :
$ operator is invalid for atomic vectors

When I type is.atomic(time) it returns FALSE, but when I type is.recursive(time) it returns TRUE.

Have I typed something wrong in my defining dummy variables or how do I fix this?

Would this be a good approach?

I would like to test if p(nocollar) would perform better than a p(.) model


This is now rapidly becoming an RMark query -- please start a new thread in the RMark sub-forum - perhaps cut-and-paste this query there to start it along.