There do exist packages for multi-variate integration in R, but sticking to
base functions, what you've described should work but the inner integral will
need to be vectorized before it's passes to the outer integral: Vectorize() can
do this directly, but it won't be particularly fast since it's
Hi,
I have a function that I need to do double integration:
\int^T_0 \int^t_0 N(\delta / \sigma \sqrt(u)) (1-N(\delta / \sigma
\sqrt(u))) du dt
where N(x) is a standard normal probability of x.
I start off by writing an inner integral into a function. Meaning
\int^t_0 N(\delta,\sigma \sqrt(u))
dicine and Gerontology
School of Medicine
Johns Hopkins University
Ph. (410) 502-2619
email: rvarad...@jhmi.edu
- Original Message -
From: Bogaso Christofer
Date: Saturday, July 3, 2010 9:12 am
Subject: RE: [R] Double Integration
To: 'Ravi Varadhan' , r-help@r-project.org
> H
Bogaso Christofer gmail.com> writes:
>
> 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),
>
ed, rather
archived: see http://cran.r-project.org/src/contrib/Archive/adapt/
Christos
CC: argch...@hotmail.com; sarah_sanche...@yahoo.com; r-help@r-project.org
From: dwinsem...@comcast.net
To: rvarad...@jhmi.edu
Subject: Re: [R] Double Integration
Date: Fri, 2 Jul 2010 20:40:00 -0400
A
hristos Argyropoulos'; sarah_sanche...@yahoo.com; r-help@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-boun...@r
.@comcast.net
> To: rvarad...@jhmi.edu
> Subject: Re: [R] Double Integration
> Date: Fri, 2 Jul 2010 20:40:00 -0400
>
> And an adapt() in fCopulae.
>
> --
> David.
> On Jul 2, 2010, at 7:06 PM, Ravi Varadhan wrote:
>
> > There is no package called `integrat
[mailto:r-help-boun...@r-project.org
] On
Behalf Of Christos Argyropoulos
Sent: Friday, July 02, 2010 8:41 AM
To: sarah_sanche...@yahoo.com; r-help@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_sa
02, 2010 8:41 AM
To: sarah_sanche...@yahoo.com; r-help@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_sanche...@yahoo.com
> To: r-help@r-project.org
> Subject: [R] Double Integrati
Function adapt in package integrate maybe?
> Date: Thu, 1 Jul 2010 05:30:25 -0700
> From: sarah_sanche...@yahoo.com
> To: r-help@r-project.org
> Subject: [R] Double Integration
>
> Dear R helpers
>
> I am working on the Bi-variate Normal distribution probabilit
Johns Hopkins University
Ph. (410) 502-2619
email: rvarad...@jhmi.edu
- Original Message -
From: Hans W Borchers
Date: Thursday, July 1, 2010 2:47 pm
Subject: Re: [R] Double Integration
To: r-h...@stat.math.ethz.ch
> Sarah Sanchez yahoo.com> writes:
> >
> > Dear R helper
Sarah Sanchez yahoo.com> writes:
>
> 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)
On Jul 1, 2010, at 8:30 AM, Sarah Sanchez wrote:
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 *
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
"Susanne Pfeifer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I would like to solve a double integral of the form
>
> \int_0^1 \int_0^1 x*y dx dy
>
> using Gauss Quadrature.
OK, I felt guilty for using a for loop, so here's something that should be
close to what you wan
"Susanne Pfeifer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I would like to solve a double integral of the form
. . .
> but I would like to use Gauss Quadrature to do it.
> I have written the following code (using R's statmod package) which
> works fine for one integral
Hi,
I would like to solve a double integral of the form
\int_0^1 \int_0^1 x*y dx dy
using Gauss Quadrature.
I know that I can use R's integrate function to calculate it:
integrate(function(y) {
sapply(y, function(y) {
integrate(function(x) x*y, 0, 1)$value
})
}, 0, 1)
but I would like to use
Hi,
I would like to solve a double integral of the form
\int_0^1 \int_0^1 x*y dx dy
using Gauss Quadrature.
I know that I can use R's integrate function to calculate it:
integrate(function(y) {
sapply(y, function(y) {
integrate(function(x) x*y, 0, 1)$value
})
}, 0, 1)
but I would like to use
18 matches
Mail list logo