On Jun 14, 2014, at 7:40 AM, Christofer Bogaso wrote:
> Hi again,
>
> I was tying to solve following 2-fold integration with package cubature.
> However spending approximately 2 hours it failed to generate any number. I
> am using latest R with win-7 machine having 4gb ram.
>
>> library(cubatur
Hi again,
I was tying to solve following 2-fold integration with package cubature.
However spending approximately 2 hours it failed to generate any number. I
am using latest R with win-7 machine having 4gb ram.
> library(cubature)
> f <- function(x) {
+ z1 <- x[1]
+ z2 <- x[2]
+
+ Rho = 1
+
+ L <
On 22-04-2013, at 15:04, Hicham Mezouara wrote:
>
> hello
> I work on
> the probabilities of bivariate normal distribution. I need
> integrate the
> following function.
> f (x, y) = exp [- (x ^ 2 + y ^ 2 + x * y)] with - ∞ ≤ x ≤
> 7.44 and - ∞ ≤ y ≤ 1.44 , either software R or matlab Versio
On Mon, Apr 22, 2013 at 2:04 PM, Hicham Mezouara wrote:
> hello
> I work on
> the probabilities of bivariate normal distribution. I need
> integrate the
> following function.
> f (x, y) = exp [- (x ^ 2 + y ^ 2 + x * y)] with - ∞ ≤ x ≤
> 7.44 and - ∞ ≤ y ≤ 1.44 , either software R or matlab Ver
hello
I work on
the probabilities of bivariate normal distribution. I need
integrate  the
following function.
f (x, y) = exp [- (x ^ 2 + y ^ 2 + x * y)] with - â ⤠x â¤
7.44 and - â ⤠y ⤠1.44  , either software R or  matlab Version R
2009a
Thank you
for helping me
Regards
Michael Meyer yahoo.com> writes:
>
Check your logic. The following lines show that integrate *does* return the
correct values:
a = 0.08 # alpha
M <- function(j,s){ return(exp(-j*a*s)) }
A <- matrix(NA, 5, 5)
for (i in 1:5) {
for (j in i:5) {
f <-
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
y 8, 2012 1:44 PM
Subject: Re: [R] Numerical integration of a two dimensional function over a disk
"Simply impossible" seems an odd description for a technique described in every
elementary calculus text under the heading "integration in cylind
"Simply impossible" seems an odd description for a technique described in every
elementary calculus text under the heading "integration in cylindrical
coordinates".
---
Jeff NewmillerThe .
Hello, there!
Basically my problem is very clear. I would like to take a
(numerical) integration of a function f(x,y) which can be quite complex of x
and y, over a disk (x-a)^2+(y-b)^2<= r^2 (with r constant). However, after some
search in R, I just cannot find a function in R that suits my pu
ine though.
I am using 'quadinf' to avoid some large parameters that will cause the
function to return an error or return an inaccurate value, discussed in
http://r.789695.n4.nabble.com/R-numerical-integration-td4500095.html
R-numerical-integration
Any comments or suggestions?
Thank
casperyc hotmail.co.uk> writes:
>
I don't know what is wrong with your Maple calculations, but I think
you should check them carefully, because:
(1) As Petr explained, the value of the integral will be < 0.5
(2) The approach of Peter still works and returns : 0.4999777
(3) And the same result c
arial Science, University of Kent
###
--
View this message in context:
http://r.789695.n4.nabble.com/R-numerical-integration-tp4500095p4503766.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https:
On Mar 24, 2012, at 09:46 , Petr Savicky wrote:
> Integrating with infinite limits is necessarily a heuristic.
...as is numerical integration in general. In the present case, the infinite
limits are actually only half the problem. The integrate() function is usually
quite good at dealing with
On Fri, Mar 23, 2012 at 01:27:57PM -0700, casperyc wrote:
> Hi all,
>
> Is there any other packages to do numerical integration other than the
> default 'integrate'?
>
> Basically, I am integrating:
>
> integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value
>
> The integration is o
Hans W Borchers googlemail.com> writes:
>
> casperyc hotmail.co.uk> writes:
>
> > Is there any other packages to do numerical integration other than the
> > default 'integrate'?
> > Basically, I am integrating:
> >
> > integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value
> >
>
casperyc hotmail.co.uk> writes:
> Is there any other packages to do numerical integration other than the
> default 'integrate'?
> Basically, I am integrating:
>
> integrate(function(x) dnorm(x,mu,sigma)/(1+exp(-x)),-Inf,Inf)$value
>
> The integration is ok provided sigma is >0.
> However, when m
this message in context:
http://r.789695.n4.nabble.com/R-numerical-integration-tp4500095p4500095.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
thanks for the Italian!
I apologize for my previuos explanation which was not clear
actually there are two "k" parameters, so I change one them; let's put it
this way
/# these are the 3 parameters
a<- 414.566
b<- 345.5445
g<- -0.9695679
xstar<- 1397.923
*m<-100*
#I create a vector
pars <-
thank you very much for your suggestion!
I tried to do that with the psf I need to use: the 3 parameters Lognormal. I
did that with a single xstar and a single triplet of parameters to check it
works.[I put some numbers to make it woks , but actually they comes from
statistical analysis]
/# the
Hi:
You could write the function this way:
f <- function(x, xstar, k) dnorm(x) * k * x * (x >= xstar)
where the term in parentheses is a logical. For any x < xstar, f will
be zero by definition. Substitute your density in for dnorm().
To integrate over a grid of (xstar, k) values, you could try
Hello!
I know that probably my question is rather simple but I' m a very beginner
R-user.
I have to numerically integrate the product of two function A(x) and B(x).
The integretion limits are [X*; +inf]
Function A(x) is a pdf function while B(x)=e*x is a linear function whose
value is equal to
The domain of the beta distribution as defined in R is 0 <= x <= 1 and as
shown by David Winsemius it is undefined outside [0,1]. But thats sort of
the question I have.
To elaborate, I have a variable with 0 as its natural lower limit but can
assume any positive number as an upper limit. So its do
On Jun 23, 2011, at 8:55 AM, Adan_Seb wrote:
Here is a self-contained example of my problem.
set.seed(100)
x = rbeta(100, 10.654, 10.439)
# So the shape parameters and the exteremes are
a = 10.654
b = 10.439
xmax = 1
xmin = 0
# Using the non-standardized form (as in my application and this
s
Here is a self-contained example of my problem.
set.seed(100)
x = rbeta(100, 10.654, 10.439)
# So the shape parameters and the exteremes are
a = 10.654
b = 10.439
xmax = 1
xmin = 0
# Using the non-standardized form (as in my application and this shouldn't
make any difference) of the
# Beta densi
Sent: Wednesday, June 22, 2011 6:46 PM
To: r-help@r-project.org
Subject: [R] numerical integration and 'non-finite function value' error
Dear R users,
I have a question about numerical integration in R.
I am facing the 'non-finite function value' error while
Dear R users,
I have a question about numerical integration in R.
I am facing the 'non-finite function value' error while integrating the
function
xf(x)
using 'integrate'. f(x) is a probability density function and assumed to
follow the three parameter (min = 0) beta
On Nov 17, 2010, at 6:44 AM, Eduardo de Oliveira Horta wrote:
Hi!
I was wondering if there are any other functions for numerical
integration,
besides 'integrate' from the stats package, but which wouldn't
require the
integrand to be vectorized. Oh, and must be capable of integrating
over
Hi!
I was wondering if there are any other functions for numerical integration,
besides 'integrate' from the stats package, but which wouldn't require the
integrand to be vectorized. Oh, and must be capable of integrating over
(-inf,+inf).
Thanks in advance,
Eduardo Horta
[[alternative
> -Original Message-
> From: Julio Rojas [mailto:jcredbe...@ymail.com]
> Sent: Friday, December 18, 2009 9:06 AM
> To: William Dunlap; r-help@r-project.org
> Subject: RE: [R] Numerical Integration
>
> Thanks a lot William. I'm sorry about the syntax problem. I
ain, thanks.
One last question: Is there a way to use "approx" as the integrand?
Best regards.
Julio
--- El vie 18-dic-09, William Dunlap escribió:
> De: William Dunlap
> Asunto: RE: [R] Numerical Integration
> A: "Julio Rojas"
> Fecha: viernes, 18 diciembre
Dear @ll. I have to calculate numerical integrals for triangular and
trapezoidal figures. I know you can calculate the exactly, but I want to do it
this way to learn how to proceed with more complicated shapes. The code I'm
using is the following:
integrand<-function(x) {
print(x)
if(x=fx
rg
Subject: [R] Numerical integration problem
Hi there
I'm trying to construct a model of mortality risk in 2D space that
requires numerical integration of a hazard function, for which I'm using
the integrate function. I'm occasionally encountering parameter
combinations that cause inte
Hi there
I'm trying to construct a model of mortality risk in 2D space that
requires numerical integration of a hazard function, for which I'm using
the integrate function. I'm occasionally encountering parameter
combinations that cause integrate to terminate with error "Error in
integrate... the i
] numerical integration
Hi r-users,
Can I do a numerical integration in R to solve for F(z)- integral_0^z {f(t)
dt} = 0 where F(z) is the CDF and f(t) is the pdf? What package can I use?
Thank you so much for any help given.
[[alternative HTML version deleted
Hi r-users,
Can I do a numerical integration in R to solve for F(z)- integral_0^z {f(t) dt}
= 0 where F(z) is the CDF and f(t) is the pdf? What package can I use?
Thank you so much for any help given.
[[alternative HTML version deleted]]
___
Hi,
You may want to try the double exponential transformation on the numerator and
the denominator on this one.
The method is described in detail here:
http://projecteuclid.org/DPubS?service=UI&version=1.0&verb=Display&handle=euclid.prims/1145474600
If you want to give it a shot outside
On 02/01/2009 6:37 AM, Allan Clark wrote:
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 experimentat
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
==
On Fri, 7 Mar 2008, Max wrote:
> Prof Brian Ripley formulated on Friday :
>> On Fri, 7 Mar 2008, Max wrote:
>>
>>> Dear UseRs,
>>>
>>> I'm curious about the derivative of n!.
>>>
>>> We know that Gamma(n+1)=n! So when on takes the derivative of
>>> Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf)
le/Faculty/Varadhan.html
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Max
Sent: Friday, March 07, 2008 1:41 PM
To: [EMAIL PROTECTED]
Subject: [R] Numerical Integration in 1D
Dear UseRs,
I'm cu
Prof Brian Ripley formulated on Friday :
> On Fri, 7 Mar 2008, Max wrote:
>
>> Dear UseRs,
>>
>> I'm curious about the derivative of n!.
>>
>> We know that Gamma(n+1)=n! So when on takes the derivative of
>> Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf).
>>
>> I've tried code like
>>
>>> in
Faculty/Varadhan.html
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Max
Sent: Friday, March 07, 2008 1:41 PM
To: [EMAIL PROTECTED]
Subject: [R] Numerical Integration in 1D
Dear UseRs,
I'm curious about the derivative of n!.
We know that Gamma(n+
On Fri, 7 Mar 2008, Max wrote:
> Dear UseRs,
>
> I'm curious about the derivative of n!.
>
> We know that Gamma(n+1)=n! So when on takes the derivative of
> Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf).
>
> I've tried code like
>
>> integrand<-function(x) {log(x)*exp(x)*x^n}
>> integrate(inte
Dear UseRs,
I'm curious about the derivative of n!.
We know that Gamma(n+1)=n! So when on takes the derivative of
Gamma(n+1) we get Int(ln(x)*exp(-x)*x^n,x=0..Inf).
I've tried code like
> integrand<-function(x) {log(x)*exp(x)*x^n}
> integrate(integrand,lower=0,upper=Inf)
It seems that R doesn
Chris Rhoads wrote:
>
>
> 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) dx. Again, the integral
> invo
On Tue, Feb 19, 2008 at 11:07 PM, Chris Rhoads
<[EMAIL PROTECTED]> wrote:
> 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 variable
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.
48 matches
Mail list logo