Hi, The "adapt" package might work, but note that it cannot handle infinite limits. So, integrate() is your best bet. Since you need to integrate out only one dimension, integrate() would work just fine.
As for differentiation, you might try the grad() fucntion in the "numDeriv" package. Ravi. ____________________________________________________________________ Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu ----- Original Message ----- From: Wei-han Liu <weihanliu2...@yahoo.com> Date: Saturday, March 7, 2009 9:38 am Subject: [R] multivariate integration and partial differentiation To: r-help@r-project.org > Hi R Users: > > Could somebody share some tips on implementing multivariate > integration and partial differentiation in R? > > For example, for a trivariate joint distribution (cumulative density > function) of F(x,y,z), how to differentiate with respect to x and get > the bivariate distribution (probability density function) of f(y,z). > Or integrate f(x,y,z) with respect to x to get bivariate distribution > of (y,z). > > Your sharing is appreciated. > > Wei-han Liu > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > > PLEASE do read the posting guide > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.