[R] Memory usage problem while using nlm function

2014-12-31 Thread Kushal
Hi, I am trying to do nonlinear minimization using nlm() function, but for large amount of data it is going out of memory. Code which i am using: f<-function(p,n11,E){ sum(-log((p[5] * dnbinom(n11, size=p[1], prob=p[2]/(p[2]+E)) + (1-p[5]) * dnbinom(n11, size=p[3], prob=p[4]/(p[4]+E)))

[R] Help Required

2007-11-21 Thread Kushal M Shah
Hi Friends I am working on a Financial Model project in R and require help in writing code for Moving Averages. Since I am very new to R, it would be good if any seniors in the group can guide me on a proper moving average code. Thanks & Best Regards, Kushal The informatio