Page 1 of 1

g0 Occasion Specific Estimates

PostPosted: Fri Sep 11, 2015 11:22 pm
by mjgould
Hey Everyone,

I seem to be having a bit of a mind cramp. I'm trying to the pull occasion specific estimates of g0 from my model, but I'm struggling to do so. I'm not too experienced with the intricacies of calling upon specific parts of a fitted model so I may not even be in the right ballpark. I tried copying and tweaking code from previous posts but no luck.

The model is (t + veg) with 4 sampling occasions. I'd like g0 estimates for the each occasion but not each veg type. Any help would be much appreciated.

M

Here's my code:

Code: Select all
Sangres2013 <- secr.fit(...model = list(D ~ 1, g0 ~ t+veg, sigma ~ 1)
predict(Sangres2013, newdata = expand.grid(t = factor(1:4)))

Re: g0 Occasion Specific Estimates

PostPosted: Mon Sep 28, 2015 2:44 pm
by murray.efford
M
I guess you have solved this by now... I do not know enough about 'veg' to be sure, but something like this should work:
Code: Select all
predict(Sangres2013, newdata = data.frame (t = factor(1:4), veg = rep(1,4)))

The point is that even though you do not want to vary 'veg', you must nominate a level that will be used by predict; g0 values will be specific to each t and that reference level of veg.
Murray

Re: g0 Occasion Specific Estimates

PostPosted: Mon Sep 28, 2015 7:35 pm
by mjgould
Thanks once again for your time and clarifying the issue, Murray.