[R] Question regarding finding credible interval using r2winbugs

Ben Bolker bolker at ufl.edu
Mon Aug 17 15:11:13 CEST 2009


 [cc'd to list]

  You may need

coda::HPDinterval(as.mcmc(fit),prob=0.9)

SATRAJIT ROYCHOUDHURY wrote:
> Dear Ben,
> 
> coda::HPDinterval(fit,prob=0.9)
> 
> This command is keep giving me error message as;
> Error in HPDinterval(fit) : no applicable method for "HPDinterval"
> 
> Can you pls tell me what is the way around of this error?
> 
> Thanks in advance,
> 
> Best regards,
> 
> Satrajit
> 
> On Sun, Aug 16, 2009 at 9:55 PM, SATRAJIT ROYCHOUDHURY <satrirqa at gmail.com<mailto:satrirqa at gmail.com>> wrote:
> Thanks a lot!
> 
> 
> On Sun, Aug 16, 2009 at 9:45 PM, Ben Bolker <bolker at ufl.edu<mailto:bolker at ufl.edu>> wrote:
> 
> 
> coda::HPDinterval(fit,prob=0.9)
> 
> 
> SATRAJIT ROYCHOUDHURY-2 wrote:
>> Dear
>>
>>   I am trying to find a 90% credible interval. I am using the following
>> code.
>>    fit<-bugs(
>>    model.file=BUGScode,
>>    data=data,
>>    inits = list(geninits1,geninits2),
>>    parameters.to.save=keepers,
>>    n.chains=nchains,
>>    n.iter=runs,
>>    n.burnin=burn,
>>    n.thin=nthin,
>>    DIC= TRUE,
>>    bugs.directory="C:/Program Files/WINBUGS.14",
>>
>>
>> \
>>    )
>>
>>    But this is only giving 95% credible interval. How can I get 90%, 80%
>>    credible intervals using r2winbugs?
>>
>>    Pls help.
>>
>>    Waiting for your response.
>>
>>    Satrajit
>>
>>       [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org<mailto:R-help at r-project.org> mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
> 
> --
> View this message in context: http://www.nabble.com/Question-regarding-finding-credible-interval-using-r2winbugs-tp24998594p24999931.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org<mailto:R-help at r-project.org> mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
> 
> 
> 


-- 
Ben Bolker
Associate professor, Biology Dep't, Univ. of Florida
bolker at ufl.edu / www.zoology.ufl.edu/bolker
GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090817/45938e0b/attachment-0002.bin>


More information about the R-help mailing list