Re: [R] sum to infinity

2009-03-25 Thread Mandro Litt
Well, sum of 1/m! is e--does that answer your question? Generally, I guess you have to decide how much error you're comfortable with; then using an error approximation formula, you can back out the M at which you can stop the sum. Then you can write a for loop that ends at M. Hope that helps. O

[R] (specific) Question about kernel

2009-03-25 Thread Mandro Litt
Hello everybody, I am trying to compute the following double summation and am encountering problems; I wonder if you can help? Basically I have a matrix B of data points (data frame?) and want to create a matrix g such that its (i,t) entry is defined as follows: g(i,t) = sum_{s = 1}^T

[R] Confusion about ecdf

2009-03-25 Thread Mandro Litt
Hi, I'm bit confused about ecdf (read the help files but still not sure about this). I have an analytical expression for the pdf, but want to get the empirical cdf. How do I use this analytical expression with ecdf? If this helps make it concrete, the pdf is: f(u) = \sum_{t = 1}^T 1/n_t \sum_{i