similar to: Re: numerical integration {better than integrate(.)} ?

Displaying 20 results from an estimated 7000 matches similar to: "Re: numerical integration {better than integrate(.)} ?"

2005 Jul 14
1
Fwd: Re: Problem installing R packages
Hi, I am trying to install the R libraries "rmutil" and "repeated" on a Mac OS X version 10.4.1 (which has the latest version of the Mac Developer tools installed) and I am having trouble compiling the libraries. The error message I receive is as follows (I have only included the error message when I try and install the rmutil library): ............................ *
2007 Nov 03
0
installing packages on OS X -- lgfortran problem
I am trying to install two packages that are not available at CRAN (rmutil, dna). When trying the R CMD INSTALL with either file, I get an error message that ends with /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: can't locate file for: -lgfortran /usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: file: -lgfortran is not an object file (not allowed in a library) Can anyone
2012 May 23
1
numerical integration
Greetings, Sorry, the last message was sent by mistake! Here it is again: I encounter a strange problem computing some numerical integrals on [0,oo). Define $$ M_j(x)=exp(-jax) $$ where $a=0.08$. We want to compute the $L^2([0,\infty))$-inner products $$ A_{ij}:=(M_i,M_j)=\int_0^\infty M_i(x)M_j(x)dx $$ Analytically we have $$ A_{ij}=1/(a(i+j)). $$ In the code below we compute the matrix
2012 May 23
0
numerical integrals
Greetings,   I encounter a strange problem computing some numerical integrals on [0,oo). Define $$ M_j(x)=exp(-jax) $$ where $a=0.08$. We want to compute the $L^2([0,\infty))$-inner products $$ A_{ij}:=(M_i,M_j)=\int_0^\infty M_i(x)M_j(x)dx $$ Analytically we have $$ A_{ij}=1/(a(i+j)). $$ In the code below we compute the matrix $A_{i,j}$, $1\leq i,j\leq 5$, numerically and check against the known
2010 Apr 14
2
Gaussian Quadrature Numerical Integration In R
Hi All, I am trying to use A Gaussian quadrature over the interval (-infty,infty) with weighting function W(x)=exp(-(x-mu)^2/sigma) to estimate an integral. Is there a way to do it in R? Is there a function already implemented which uses such weighting function. I have been searching in the statmode package and I found the function "gauss.quad(100, kind="hermite")" which uses
2009 Jan 14
1
Ordinal Package Errors
I'm trying to install the ordinal package (http://popgen.unimaas.nl/~plindsey/rlibs.html). I downloaded ordinal03.tgz and untarred it. rmutil was previously installed (and appears to work ok.) Then I installed ordinal: [root at localhost ~]# R CMD INSTALL /home/chippy/Download/ordinal * Installing to library '/usr/lib/R/library' * Installing *source* package 'ordinal' ... **
2013 Feb 15
1
minimizing a numerical integration
Dear all, I am a new user to R and I am using pracma and nloptr libraries to minimize a numerical integration subject to a single constraint . The integrand itself is somehow a complicated function of x and y that is computed through several steps. i formulated the integrand in a separate function called f which is a function of x &y. I want to find the optimal value of x such that the
2006 May 05
0
Spline integration & Gaussian quadrature (was: gauss.quad.prob)
Spencer Thanks for your thoughts on this. I did a bit of work and did end up with a method (more a trick), but it did work. I am certain there are better ways to do this, but here is how I resolved the issue. The integral I need to evaluate is \begin{equation} \frac{\int_c^{\infty} p(x|\theta)f(\theta)d\theta} {\int_{-\infty}^{\infty} p(x|\theta)f(\theta)d\theta} \end{equation} Where
2006 Nov 18
1
Questions regarding "integrate" function
Hi there. Thanks for your time in advance. I am using R 2.2.0 and OS: Windows XP. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two marginal densities. My problem: I have the following R codes using "adapt" package. Although "adapt"
2006 Nov 17
0
Question regarding "integrate" function
Hi there. Thanks for your time in advance. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two estimated marginal densities. My problem: I have the following R codes using "adapt" package. Although "adapt" function is mainly designed
2006 Nov 17
0
questions regarding "integrate" function in R
Hi there. Thanks for your time in advance. My final goal is to calculate 1/2*integral of (f1(x)^1/2-f2(x)^(1/2))^2dx (Latex codes: $\frac{1}{2}\int^{{\infty}}_{\infty} (\sqrt{f_1(x)}-\sqrt{f_2(x)})^2dx $.) where f1(x) and f2(x) are two marginal densities. My problem: I have the following R codes using "adapt" package. Although "adapt" function is mainly designed for more
2000 Sep 02
1
R INSTALL *.tgz fails (minor docs/feature bug) (PR#652)
R Team, I was attempting to install Lindsey's rmutil.tgz and other non-CRAN packages using 'R INSTALL', for example 'R INSTALL rmutil.tgz' after downloading 'rmutil.tgz' from Lindsey's page (as linked from r-project.org page). Directly using the compressed file as 'R INSTALL rmutil.tgz' failed, though the shell help from 'R INSTALL --help'
2010 Sep 21
3
bivariate vector numerical integration with infinite range
Dear list, I'm seeking some advice regarding a particular numerical integration I wish to perform. The integrand f takes two real arguments x and y and returns a vector of constant length N. The range of integration is [0, infty) for x and [a,b] (finite) for y. Since the integrand has values in R^N I did not find a built-in function to perform numerical quadrature, so I wrote my own after
2003 Oct 29
2
Where is rmutil package?
Pursing my earlier question, when I tried loading Lindsey's gnlm, I got a message Loading required package: rmutil Warning message: There is no package called 'rmutil' in: library(package, character.only = TRUE, logical = TRUE, warn.conflicts = warn.conflicts, According to the R documentation http://finzi.psych.upenn.edu/R/doc/html/packages.html rmutil is in the standard
2011 Nov 06
2
how to use quadrature to integrate some complicated functions
Hello to all, I am having trouble with intregrating a complicated uni-dimensional function of the following form Phi(x-a_1)*Phi(x-a_2)*...*Phi(x-a_{n-1})*phi(x-a_n). Here n is about 5000, Phi is the cumulative distribution function of standard normal, phi is the density function of standard normal, and x ranges over (-infty,infty). My idea is to to use quadrature to handle this integral. But
2006 Oct 07
1
Installing Lindsey's packages
Dear r-helpers, I downloaded http://popgen.unimaas.nl/~jlindsey/rcode/rmutil.tar (it was originally .tgz, but got unzipped by my browser). Can anyone give me detailed instructions on installing this and Lindsey's other packages on R version 2.4.0 (2006-10-03)---(powerpc- apple-darwin8.7.0, locale: C)? _____________________________ Professor Michael Kubovy University of Virginia
2004 May 28
3
gauss.hermite?
The search at www.r-project.org mentioned a function "gauss.hermite{rmutil}". However, 'install.packages("rmutil")' produced, 'No package "rmutil" on CRAN.' How can I find the current status of "gauss.hermite" and "rmutil"? Thanks, Spencer Graves
2015 Apr 09
3
typo in R-exts.html section 6.9
In 'Writing R Extensions' section 6.9 there is the paragraph There are interfaces (defined in header R_ext/Applic.h) for definite and for indefinite integrals. ?Indefinite? means that at least one of the integration boundaries is not finite. An indefinite integral usually means an antiderivative, not an integral over an infinite spread. Should that first sentence end with 'for
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 Oct 23
2
2-D numerical integration over odd region
Hello all, I'm hoping to find a way to evaluate the following sort of integral in R. \int_a^b \int_{g(y)}^Inf f(x,y) dx dy. The integral has no closed form and so must be evaluated numerically. The "adapt" package provides for multidimensional integration but does not appear to allow the limits of integration to be a function. I need to evaluate a number of integrals of this