Re: [R] integration

From: Ravi Varadhan <>
Date: Mon, 11 Apr 2011 12:14:20 -0400

It does. See `lower' and `upper' arguments.

Why are y and z not known? Say, you want the marginal of x, i.e. integrate over x. Now, y and z are fixed. You fix them at different values, but they are known.


Ravi Varadhan, Ph.D.
Assistant Professor,
Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University

Ph. (410) 502-2619

From: cindy Guo [] Sent: Saturday, April 09, 2011 5:07 PM
To: Ravi Varadhan
Subject: Re: [R] integration

'integrate' does not allow parameter limits. For example, the limits of x is (z/y, Inf) while z and y are unkonwn. On Fri, Apr 8, 2011 at 9:46 PM, Ravi Varadhan <<>> wrote: ?integrate

From:<> [<>] On Behalf Of cindy Guo [<>] Sent: Friday, April 08, 2011 9:21 PM
To:<> Subject: [R] integration

Hi, All,

I have a density function with 3 variables which is defined on some irregular domain, and I want to get the marginal distribution of each variable. Is there any function doing this?

A simple example is p(x,y,z)=x*y*z*I(xy>z). So each marginal distribution is a function of the other two variables. My density form is very complicated, so I cannot do it by hand. I was just wondering if there is any function in R for this?



       [[alternative HTML version deleted]]<> mailing list PLEASE do read the posting guide<> and provide commented, minimal, self-contained, reproducible code.

        [[alternative HTML version deleted]] mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Mon 11 Apr 2011 - 16:17:19 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 11 Apr 2011 - 17:10:29 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive