inverse Gaussian distribution

If you are seeking RATS code for implementing a particular technique or replicating results from a paper, post your request here. Be sure to include complete citations for any papers or books.

inverse Gaussian distribution

Unread postby tclark » Tue Feb 04, 2020 10:22 am

Has anyone by chance worked out how to draw in RATS from an inverse Gaussian distribution? Drawing from this distribution shows up in Gibbs samplers for Bayesian quantile regression. Thanks.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
tclark
 
Posts: 85
Joined: Wed Nov 08, 2006 4:20 pm

Re: inverse Gaussian distribution

Unread postby TomDoan » Mon Feb 17, 2020 1:13 pm

That's a fairly straightforward function (attached). This is based on the Java code on the wikipedia page for the distribution.
Attachments
raninvgaussian.src
Procedure file for function
(718 Bytes) Downloaded 416 times
TomDoan
 
Posts: 7240
Joined: Wed Nov 01, 2006 5:36 pm

Re: inverse Gaussian distribution

Unread postby tclark » Mon Feb 17, 2020 9:24 pm

Terrific -- thanks very much!
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
tclark
 
Posts: 85
Joined: Wed Nov 08, 2006 4:20 pm


Return to Looking for Code?

Who is online

Users browsing this forum: No registered users and 2 guests

cron