Page 1 of 1

Altering Confidence Intervals

PostPosted: Wed Mar 04, 2015 4:46 pm
by adamdillon
I'm sure there is a simple solution that I'm overlooking but I'm having trouble getting SECR to output Confidence Intervals for D, g0, and sigma that are not 95%. I'd like each of my models to output 80% CIs for each parameter.

I know you can use coef(model.name, alpha = 0.20) to alter the CIs for the beta parameters and derived(model.name, alpha = 0.20) to alter the CIs for the derived parameters but I'm using the full likelihood and therefore Density isn't derived. Any ideas on how to calculate 80% CIs would be greatly appreciated. I'm assuming it is something that can either be altered within secr.fit(), or possibly it is something you need to specify after the model has already run. Thanks

Re: Altering Confidence Intervals

PostPosted: Wed Mar 04, 2015 4:53 pm
by murray.efford
See ?predict.secr. The predict method is used when displaying (printing) a fitted secr model, and the default is alpha = 0.05.

Code: Select all
 predict(secrdemo.0)
#       link   estimate SE.estimate       lcl        ucl
#D       log  5.4798043  0.64674088  4.351623  6.9004731
#g0    logit  0.2731906  0.02705126  0.223477  0.3292739
#sigma   log 29.3658319  1.30493781 26.917572 32.0367713

predict(secrdemo.0, alpha = 0.2)
#       link   estimate SE.estimate        lcl        ucl
#D       log  5.4798043  0.64674088  4.7130728  6.3712692
#g0    logit  0.2731906  0.02705126  0.2399248  0.3091925
#sigma   log 29.3658319  1.30493781 27.7409936 31.0858399

Re: Altering Confidence Intervals

PostPosted: Wed Mar 04, 2015 4:59 pm
by murray.efford
This works, too.
Code: Select all
print(secrdemo.0, alpha = 0.2)


And see the Note in the help for secr.fit.

Murray