similar to: numerical intergation

Displaying 20 results from an estimated 1300 matches similar to: "numerical intergation"

2002 Jul 14
1
help with adapt function
Dear People, I'm trying to use the function adapt, from the adapt library package, which does multidimensional numerical integration. I think I must be using the wrong syntax or something, because even a simple example does not work. Consider foo <- function(x){x[1]*x[2]} and adapt(2, lo = c(-1,-1), up = c(1,1), functn = foo) This simply hangs. A more complicated example crashes R,
2007 Oct 29
1
meaning of lenwrk value in adapt function
R-listers, In using the adapt function, I am getting the following warning: Ifail=2, lenwrk was too small. -- fix adapt() ! Check the returned relerr! in: adapt(ndim = 2, lower = lower.limit, upper = upper.limit, functn = pr.set, Would someone explain what the 'lenwrk' value indicates in order to help diagnose this issue. Also, what are the possible codes for Ifail, so I can set
2007 Mar 28
1
warnings on adapt
Hi all I was wondering if someone could help me. I have to estimate some parameters, so I am using the function nlm. Inside this function I have to integrate, hence I am using the function adapt. I don't understand why it is giving the following warnings: At the beginning: Warning: a final empty element has been omitted the part of the args list of 'c' being evaluated was:
2001 Mar 08
1
inconsistent results when calling functions with other func (PR#869)
Hello Bug people, I have an unexpected behavior and am unsure whether the problem is in my thinking, my implementation or the program R. Basically I get two different answers depending on how I call a function which takes other functions as arguments as indicated below. To me it should make no difference if f is a function that returns the function g then z(f(x)) whould give the same as y<-
2001 Jan 11
1
segmentation fault in integrate (PR#812)
I tried to integrate numerically a function wich is similar to the following: > dummy <- function(x) { exp(-1*x) * dnorm(x) } > dummy(-100) [1] 0 > dummy(-1000) [1] NaN > dummy(-10000) [1] NaN If I choose the lower boundary to be too small integrate causes a segmentation fault: > library(integrate) > integrate(dummy, -100, 0)$value [1] 1.387143 > integrate(dummy, -1000,
2006 May 05
2
double integral
Dear r-users, Is there any command in R allowing to evaluate a double integral? for instance let say I want to evaluate the following integral: integrate[lo=(0,1),up=(2,3)] f(x,y)=x^2+y^2 where lo is the vector of lower bounds and up that of upper bounds. I thaught the function "adapt" would work but it did not. Many thanks, Dominique K.
2007 Feb 13
1
Multidimensional Integration over arbitrary sets
Hi, I need to integrate a 2D function over range where the limits depend on the other e.g integrate f(x,y)=x*y over {x,0,1} and {y,x,1}. i.e \int_0^1 \int_x^1 xy dydx I checked adapt but it doesn't seem to help here. Are they any packages for this sort of thing? I tried RSitesearch but couldn't find the answer to this. Many thanks for you help. Regards Saptarshi Saptarshi Guha
2000 Jan 19
1
Segmentation fault using integrate()
Hi all, Running R 0.90.1 on a RH 6.1 system. Installation of the integrate_2.1-2 package went smoothly. My code contains a loop in which integrate() is called several times in each pass. I get a segmentation fault after what seems to be a random number of calls to integrate(). Debug output shows: Program received signal SIGSEGV, Segmentation fault. promiseArgs (el=0x40276414,
2004 Jul 27
1
Integration with "adapt"
Hi all, I need to calculate a multidimensional integration on R. I am using the command "adapt" (from library adapt), although sometimes I get the following error message: Ifail=2, lenwrk was too small. -- fix adapt() ! Check the returned relerr! in: adapt(3, linf, lsup, functn = Integrando1) I guess it happens because the domain of integration is too small, although I tried a
2007 Nov 14
0
R Crashes on certain calls of Adapt
I'm having trouble with adapt. I'm trying to use it in a Bayesian setting, to integrate the posterior distribution, and to find posterior means. I tried using the following script, and things went ok: data = rnorm(100,0.2,1.1) data = c(data,rnorm(10,3,1)) data = data[abs(data)<2*sd(data)] prior = function(x){ dgamma(x[2],shape=2,scale=1)*dnorm(x[1],0,.5) } liklihood =
2007 Jul 07
2
No convergence using ADAPT
I am trying calculate a probability using numerical integration. The first program I ran spit out an answer in a very short time. The program is below: ## START PROGRAM trial <- function(input) { pmvnorm(lower = c(0,0), upper = c(2, 2), mean = input, sigma = matrix(c(.1, 0, 0, .1), nrow = 2, ncol = 2, byrow = FALSE)) } require(mvtnorm) require(adapt) bottomB <- -5*sqrt(.1) topB <-
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"
2010 Feb 09
2
Double Integral Minimization Problem
Hello all, I am trying to minimize a function which contains a double integral, using "nlminb" for the minimization and "adapt" for the integral. The integral is over two variables (thita and radiusb) and the 3 free parameters I want to derive from the minimization are counts0, index and radius_eff. I have used both tasks in the past successfully but this is the first time
2005 Mar 04
0
* intergation with Panasonic D500 and strange echo
Hi, all ! I have a situation like this: [SIP Terminals] <-> [*] < -ISDN-PRI-> [Panasonic D500] <-> Telecom (conn to Telecom is with second PRI card in Panasonic and 16 POTS lines). Panasonic has 2 ISDN PRI cards (one to Telco, and second to Asterisk), 16 POTS lines to telco and 32 (advanced hybrid telephone type) extensions. Idea is to have possibility to have some users on
2006 Nov 21
0
[LLVMdev] EH and C++ intergation
On Tue, 21 Nov 2006, [ISO-8859-2] Žiga Osolin wrote: > I was going through documentation and source lately, and I decided how to > make llvm bytecode more compatible to C++: > 1) thiscall sould be introduced, which would take N arguments and the > first argument would always be the C++ "this" argument. This would > abstract llvm compiler dependant C++ code emittion. Sure.
2004 Oct 21
5
Cluster Analysis: Density-Based Method
Hi people, Does anybody know some Density-Based Method for clustering implemented in R? Thanks, Fernando Prass _______________________________________________________
2006 Nov 21
1
[LLVMdev] EH and C++ intergation
Chris Lattner pravi: > On Tue, 21 Nov 2006, [ISO-8859-2] Žiga Osolin wrote: >>> Sure. Anton can give you ideas for this. >>> >> I think it should not be too difficult because you allow custom call >> conversions and this is quite easy to add, we only have to garantee that >> the backend will emit it. > > Right. > >>>> 2) the ret
2006 Nov 21
0
[LLVMdev] EH and C++ intergation
I was going through documentation and source lately, and I decided how to make llvm bytecode more compatible to C++: 1) thiscall sould be introduced, which would take N arguments and the first argument would always be the C++ "this" argument. This would abstract llvm compiler dependant C++ code emition. 2) the ret instruction should be able to return structs (as Chris has already
2006 Nov 21
0
[LLVMdev] EH and C++ intergation
On Tue, 21 Nov 2006, [ISO-8859-2] Žiga Osolin wrote: >> Sure. Anton can give you ideas for this. >> > I think it should not be too difficult because you allow custom call > conversions and this is quite easy to add, we only have to garantee that > the backend will emit it. Right. >>> 2) the ret instruction should be able to return structs (as Chris has >>>
2006 Nov 21
2
[LLVMdev] EH and C++ intergation
I was going through documentation and source lately, and I decided how to make llvm bytecode more compatible to C++: 1) thiscall sould be introduced, which would take N arguments and the first argument would always be the C++ "this" argument. This would abstract llvm compiler dependant C++ code emittion. 2) the ret instruction should be able to return structs (as Chris has already