[R] Double Integration
Ravi Varadhan
rvaradhan at jhmi.edu
Mon Jul 5 00:10:43 CEST 2010
You can look at the package source in the `cubature_1.0.tar.gz' file (which you can get from CRAN), especially the `cubature.c' file.
Ravi.
____________________________________________________________________
Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology
School of Medicine
Johns Hopkins University
Ph. (410) 502-2619
email: rvaradhan at jhmi.edu
----- Original Message -----
From: Bogaso Christofer <bogaso.christofer at gmail.com>
Date: Saturday, July 3, 2010 9:12 am
Subject: RE: [R] Double Integration
To: 'Ravi Varadhan' <rvaradhan at jhmi.edu>, r-help at r-project.org
> Hi Ravi, your suggestion helped me as well a lot. If I look into that
> function, I see this function is calling another function :
>
> .Call("doCubature", as.integer(fDim), body(f.check),
> as.double(lowerLimit), as.double(upperLimit),
> as.integer(maxEval),
> as.double(absError), as.double(tol), new.env(), PACKAGE =
> "cubature")
>
> How I can see the interior of this "doCubature?"
>
> Thanks,
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [ On
> Behalf Of Ravi Varadhan
> Sent: 03 July 2010 04:36
> To: 'Christos Argyropoulos'; sarah_sanchez09 at yahoo.com; r-help at r-project.org
> Subject: Re: [R] Double Integration
>
> There is no package called `integrate', but there is a function called
> `adaptIntegrate' in the "cubature" package.
>
> Ravi.
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [ On
> Behalf Of Christos Argyropoulos
> Sent: Friday, July 02, 2010 8:41 AM
> To: sarah_sanchez09 at yahoo.com; r-help at r-project.org
> Subject: Re: [R] Double Integration
>
>
> Function adapt in package integrate maybe?
>
> > Date: Thu, 1 Jul 2010 05:30:25 -0700
> > From: sarah_sanchez09 at yahoo.com
> > To: r-help at r-project.org
> > Subject: [R] Double Integration
> >
> > Dear R helpers
> >
> > I am working on the Bi-variate Normal distribution probabilities. I
>
> > need
> to double integrate the following function (actually simplified form of
> bivariate normal distribution)
> >
> > f(x, y) = exp [ - 0.549451 * (x^2 + y^2 - 0.6 * x * y) ]
> >
> > where 2.696 < x < 3.54 and -1.51 < y < 1.98
> >
> > I need to solve something like
> >
> >
> > INTEGRATE (2.696 to 3.54) dx INTEGRATE [(-1.51 to 1.98)] f(x, y) dy
> >
> > I have referred to stats::integrate but it deals with only one
> variable.
> >
> > This example appears in Internal Credit Risk Model by Michael Ong
> > (page
> no. 160).
> >
> > Kindly guide.
> >
> > Regards
> >
> > Sarah
> >
> >
> >
> >
> >
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> >
> > PLEASE do read the posting guide
>
> > and provide commented, minimal, self-contained, reproducible code.
>
> _________________________________________________________________
> Hotmail: Trusted email with powerful SPAM protection.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
>
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> R-help at r-project.org mailing list
>
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list