C-version of the .rgigjd and .rgigjd1 functions in fBasics

Ester Pantaleo esterpantaleo at gmail.com
Tue Mar 23 14:27:41 CET 2010


To the Maintainers of the package fBasics,


I thought you might be interested in the attached code written by Robert B.
Gramacy and me which. It is inspired by the rgig function in ghyp which is
essentially identical to the .rgigjd and .rgigjd1 functions in fBasics. The
attached code is a merging of a C-version of the code in rgig and some code
from monomvn <http://www.cran.r-project.org/web/packages/monomvn/index.html>
 (a package for estimation of multivariate normal and student-t data of
arbitrary dimension where the pattern of missing data is monotone).


I am sending this in the spirit of the open source community because I
believe that the C-version, being much faster, could contribute to your
package (see file time.R for a comparison between the R and C codes). Some
details about the code follow. The R function uniroot has been replaced by a
modified version of ZEROIN from the C math library (algorithm from
G.Forsythe, M.Malcolm, C.Moler). Inverse gaussian variates (case
lambda=-0.5) are generated by the function rinvgauss (algorithm from
Michael,Schucany,Haas as given in Gentle's book on page 193) essentially in
the same way as in ghyp.


Should you have any questions, please do not hesitate to ask.


Best regards,


Ester Pantaleo


Dipartimento di Fisica

Universita' di Bari

Italy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/rmetrics-core/attachments/20100323/84f8c4e0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgig.zip
Type: application/zip
Size: 7490 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/rmetrics-core/attachments/20100323/84f8c4e0/attachment.zip>


More information about the Rmetrics-core mailing list