g0 Occasion Specific Estimates

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis.

g0 Occasion Specific Estimates

Postby mjgould » Fri Sep 11, 2015 11:22 pm

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)))
mjgould
 
Posts: 18
Joined: Fri Apr 18, 2014 2:07 pm

Re: g0 Occasion Specific Estimates

Postby murray.efford » Mon Sep 28, 2015 2:44 pm

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
murray.efford
 
Posts: 712
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: g0 Occasion Specific Estimates

Postby mjgould » Mon Sep 28, 2015 7:35 pm

Thanks once again for your time and clarifying the issue, Murray.
mjgould
 
Posts: 18
Joined: Fri Apr 18, 2014 2:07 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 0 guests