Re: [R] Numerical Integration

2006-11-09 Thread Ravi Varadhan
PM To: Ravi Varadhan Cc: 'Doran, Harold'; r-help@stat.math.ethz.ch Subject: RE: [R] Numerical Integration Hi Ravi and Harold, Thanks for the input. I'm using trapezoidal rule and like to know if there's other alternatives. This f(x) is the kernel density estimator and thus we can get an estimate

[R] Numerical Integration

2006-11-08 Thread Xiaofan Cao
Hi everyone, I'm trying to integrate f(x) over x where f(x) does not have a close form but only numerical values at certurn knots of x. Is there a way that I can use any generical R function (such as integrate) or any package to do so? Thanks! I appreciate your time. Best Regards, Martha Cao

Re: [R] Numerical Integration

2006-11-08 Thread Doran, Harold
You might try the statmod package which provides nodes and weights for gaussian quadrature. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xiaofan Cao Sent: Wednesday, November 08, 2006 12:43 PM To: r-help@stat.math.ethz.ch Subject: [R] Numerical

Re: [R] Numerical Integration

2006-11-08 Thread Gabor Grothendieck
You could approximate it with splines and then integrate that: x - 0:10/10 f - function(x) 1 + x + x^2 + x^3 + x^4 y - f(x) fs - splinefun(x, y) integrate(fs, 0, 1) integrate(f, 0, 1) On 11/8/06, Xiaofan Cao [EMAIL PROTECTED] wrote: Hi everyone, I'm trying to integrate f(x) over x where f(x)

Re: [R] Numerical Integration

2006-11-08 Thread Xiaofan Cao
@stat.math.ethz.ch Subject: Re: [R] Numerical Integration You might try the statmod package which provides nodes and weights for gaussian quadrature. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Xiaofan Cao Sent: Wednesday, November 08, 2006 12:43 PM To: r

[R] numerical integration problem

2006-06-29 Thread przeszczepan
Hi, I have got problems integrating the following function using integrate: lambdat-function(t){ tempT-T[k,][!is.na(T[k,])]#available values from k-th row of matrix T tempJ-J[k,][!is.na(J[k,])] hg-length(tempT[tempT=t tempJ==0])#counts observations satisfing the conditions

Re: [R] numerical integration problem

2006-06-29 Thread Sundar Dorai-Raj
przeszczepan wrote: Hi, I have got problems integrating the following function using integrate: lambdat-function(t){ tempT-T[k,][!is.na(T[k,])]#available values from k-th row of matrix T tempJ-J[k,][!is.na(J[k,])] hg-length(tempT[tempT=t tempJ==0])#counts observations satisfing the

Re: [R] numerical integration problem

2006-06-29 Thread Duncan Murdoch
On 6/29/2006 7:38 AM, Sundar Dorai-Raj wrote: przeszczepan wrote: Hi, I have got problems integrating the following function using integrate: lambdat-function(t){ tempT-T[k,][!is.na(T[k,])]#available values from k-th row of matrix T tempJ-J[k,][!is.na(J[k,])]

[R] numerical integration of x,y data

2005-05-03 Thread Rajarshi Guha
Hi, I was looking for a routine that would do numerical integration using x,y data rather than integrating a function. Searching CRAN showed me the sfsmisc package, which contains integrate.xy. However the documentation mentions that its not good for noisy data and plans to implement the Romberg