RE: [S] Norm of a Gaussian r.v.

Charles C. Berry (cberry@tajo.ucsd.edu)
Thu, 12 Nov 1998 10:10:30 -0800 (PST)


Alan Genz's integration software can be found on his home page:

http://www.sci.wsu.edu/math/faculty/genz/homepage

The routines there are Fortran and C, and not too hard to adapt to call from
Splus - it is mostly a matter of eliminating Fortran I/O and writing a function
for the quantity that you wish to evaluate. (If you like, I've some 'diff's from
a project in which I did this with his BAYESPACK routine for an integral that
arises in a Bayesian approach to gene mapping.)

However, if you do not need values in the extreme tails, this may be the path of
least resistance (n.b. I did *not* say this is 'efficient'):

tran <- chol(my.dispersion.matrix)

x <-
apply(matrix(rnorm(nrow(tran)*n.reps.desired),nc=nrow(tran))%*%tran,1,my.norm)

plot(x,seq(from=0,to=1,length=n.reps.desired), type="s")

for

my.norm <- function(x) sum(x^2)
n.reps.desired <- 10000
nrow(tran)==5

about 3.2 seconds are required on a SPARC ULTRA 10, S-PLUS Version 3.4 Release 1
for Sun SPARC, SunOS 5.3 : 1996

> From: matthew.a.kurbat@ncmi.com
> To: dippon@mathematik.uni-stuttgart.de, s-news@wubios.wustl.edu
> Subject: RE: [S] Norm of a Gaussian r.v.
> Date: Thu, 12 Nov 1998 09:14:54 -0500
> MIME-Version: 1.0
>
> The following paper may be useful:
> "Numerical computation of multivariate normal probabilities,"
> by Alan Genz
> Journal of Computational and Graphical Statistics
> 1992
> Vol.1, No.2, pp.141-149.
>
> I have not used it yet but it looks potentially useful.
>
> Matt Kurbat
> Bank of America
> Quantitative Finance
>
> email: matthew.kurbat@ncmi.com
>
> > -----Original Message-----
> > From: Juergen Dippon [SMTP:dippon@mathematik.uni-stuttgart.de]
> > Sent: Thursday, November 12, 1998 5:31 AM
> > To: s-news@wubios.wustl.edu
> > Subject: [S] Norm of a Gaussian r.v.
> >
> > Dear S-Plus users:
> >
> > Has anyone written a (S-)function computing the distribution function of
> > the Euclidean norm of a (centered) multivariate Gaussian random variable
> > G:
> >
> > P( ||G|| <= x ) = ?
> >
> > Or, more generally, does anyone know of a paper describing how to compute
> > this probability efficiently?
> >
>

Charles C. Berry (619) 534-2098
Dept of Family/Preventive Medicine
E mailto:cberry@tajo.ucsd.edu UC San Diego
http://hacuna.ucsd.edu/members/ccb.html La Jolla, San Diego 92093-0645
---------------------------------------------Note_Recent_Change----^^^^

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news