similar to: 2-D numerical integration over odd region

Displaying 20 results from an estimated 4000 matches similar to: "2-D numerical integration over odd region"

2008 Feb 19
2
numerical integration of a ftn of 2 variables
Dear R gurus, To start, let me confess to not being an experienced programmer, although I have used R fairly extensively in my work as a graduate student in statistics. I wish to find the root of a function of two variables that is defined by an integral which must be evaluated numerically. So the problem I want to solve is of the form: Find k such that f(k)=0, where f(y) = int_a^b g(x,y)
2013 Feb 16
3
two dimensional integration
Dear R-users, I'm wondering how to calculate this double integral in R: int_a^b int_c^y g(x, y) dx dy where g(x,y) = exp(- alpha (y - x)) * b Thanks for answering! Cheers, Alui [[alternative HTML version deleted]]
2004 Oct 21
2
How to calculate a double integral ...?
Dear R-Friends, How can I calculate a double integral like \int_a^b \int_c^y g(x, y) dx dy where a, b, c are constants, g(x, y), e.g., g(x, y) = tan(x + y). I tried to nested integrate() and adapt(), but none of them working, seemingly due to the limits can not be specified constants. Best regards, C. Joseph Lu Department of Statistics National Cheng-Kung University Voice:
2006 May 17
3
Off topic --- help in locating a source.
Apologies for the off-topic question; as usual I'm trying to draw upon the unparalleled knowledge and sagacity of the r-help list. Please reply off-list if you can help me out. A collaborator of mine found a formula we need, on sheets which he had photocopied out of a book, some years ago. He cannot remember which book (he's getting to be as senile and forgetful as I am, poor bloke!).
2011 Nov 10
2
performance of adaptIntegrate vs. integrate
Dear list, [cross-posting from Stack Overflow where this question has remained unanswered for two weeks] I'd like to perform a numerical integration in one dimension, I = int_a^b f(x) dx where the integrand f: x in IR -> f(x) in IR^p is vector-valued. integrate() only allows scalar integrands, thus I would need to call it many (p=200 typically) times, which sounds suboptimal. The
2011 Dec 18
1
Product integral in R
Hi, I am wondering if anybody ever come across any implementation of product integral in R? As far as I googled, I haven't come across any package. Is there any? Thank you. http://en.wikipedia.org/wiki/Product_integral Regards, Robert
2011 Dec 10
2
efficiently finding the integrals of a sequence of functions
Hi folks, I am having a question about efficiently finding the integrals of a list of functions. To be specific, here is a simple example showing my question. Suppose we have a function f defined by f<-function(x,y,z) c(x,y^2,z^3) Thus, f is actually corresponding to three uni-dimensional functions f_1(x)=x, f_2(y)=y^2 and f_3(z)=z^3. What I am looking for are the integrals of these three
2011 May 18
1
Integral Symbol
Dear All, I am documenting a R package. That means writing the *.Rd files inside the \man folder of the package structure I was wondering how to write the symbol for an integral function in a formula. Similar to this one in LaTeX: \int_{0}^{10} \Omega(t)dt I already tried \deqn{\int_{0}^{10} \Omega(t)dt} but it does not work. Any idea? Which math symbols does R-help recognise? Regards,
2003 Jul 11
1
metapost device in R (again ;-)
Hi, I read the 2000 thread on a MetaPost device in R. If I understand correctly, the main problem with the concept is that R wants the device driver to give back information on the size of strings/labels. To the bet of my knowledge, MetaPost _does_ make it possible to measure the bounding box of text (see section 7.3: Measuring text in the MetaPost manual). For example, one could get the size of
2008 Sep 26
1
Computing Mean Lifetime from Hazard
Hello, If all I have access to is an empirically calculated hazard function, is it possible to compute an approximate value for the mean lifetime? I know that if the hazard function is essentially constant, the mean lifetime is 1/hazard rate. ?But if I'm confident that the empirical hazard function is not constant, I'm not sure how to go about calculating an estimate of mean lifetime.
2012 Apr 19
3
Bivariate normal integral
hello, I'm trying to improve the speed of my calculation but didn't get to a satisfying result. It's about the numerical Integration of a bivariate normal distribution. The code I'm currently using x <- qnorm(seq(.Machine$double.xmin,c(1-2*.Machine$double.eps),by=0.01), mean=0,sd=1) rho <- 0.5 integral <- function(rho,x1){
2008 Sep 27
3
Double integration - Gauss Quadrature
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 Gauss Quadrature to do it. I have written the following code (using R's statmod package)
2006 Oct 10
4
generate random numbers that sum up to 1
As I have previously asked, in response to a similar question: Is this a homework problem? cheers, Rolf Turner rolf at math.unb.ca
2004 Sep 27
1
Numerical two-dimensional integration
Dear all, I need to compute (numerically) the two-dimensional integral: int(int f(x,y)dy)dx. What is the more efficient(fast) way to do it? Is adapt function appropriate for this problem? I will much appreciate your help and attention. Vicky. [[alternative HTML version deleted]]
2011 Jul 07
6
Xen unstable on NetBSD
Hello, I''m trying to compile Xen unstable on NetBSD, I''ve aplied the patches from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/xentools41/patches/?only_with_tag=MAIN and copied the blk files from http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/sysutils/xentools41/files/?only_with_tag=MAIN (I don''t know which of these patches have been applied to xen unstable, so
2009 Jan 02
1
R: numerical integration problems
hello all happy new year and hope you r having a good holiday. i would like to calculate the expectation of a particular random variable and would like to approximate it using a number of the functions contained in R. decided to do some experimentation on a trivial example. example ======== suppose x(i)~N(0,s2) where s2 = the variance the prior for s2 = p(s2)~IG(a,b) so the posterior is
2007 May 24
3
Problem with numerical integration and optimization with BFGS
Hi R users, I have a couple of questions about some problems that I am facing with regard to numerical integration and optimization of likelihood functions. Let me provide a little background information: I am trying to do maximum likelihood estimation of an econometric model that I have developed recently. I estimate the parameters of the model using the monthly US unemployment rate series
2010 Jul 01
3
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)]
2011 May 01
2
Marginal a partir de la densidad conjunta
Cordial saludo. Estoy trabajando con una densidad conjunta algo elaborada (suma y cociente de dos variables aleatorias positivas usando la cópula Frank) y requiero encontrar la distribución marginal de cada una de las variables. A manera de ejemplo (no es el caso específico, que tiene mucho más código), si partimos de la distribución exponencial bivariada #----- theta<-0.5
2008 Oct 01
2
Bivariate normal
Package mvtnorm provides dmvnorm, pmvnorm that can be used to compute Pr(X=x,Y=y) and Pr(X<x,Y<y) for a bivariate normal. Are there functions that would compute Pr(X<x,Y=y)? I'm currently using "integrate" with dmvnorm but it is too slow.