Re: [R] optimization in for loop

2011-06-29 Thread siriustar
Thankyou very much. I think "try" works for me. I am learning it . Sirius -- View this message in context: http://r.789695.n4.nabble.com/optimization-in-for-loop-tp3633638p3634100.html Sent from the R help mailing list archive at Nabble.com. __ R-hel

[R] optimization in for loop

2011-06-29 Thread siriustar
Hi, dear R help I am trying to use optim inside a for loop: ##For example. a: intial guess. b: result. f: function to be minimized for (i in 1:10) { b[i] <- optim(a[i], f)} However, some intial values cause error in optim function (e.g. " system is computationally singular..."). Then the for

[R] Can R do zero inflated gamma regression?

2011-06-05 Thread siriustar
Hi, Dear R-help I know there are some R package to deal with zero-inflated count data. But I am now looking for R package to deal with zero-inflated continuous data. The response variable (Y) in my dataset contains a larger mount of zero and the Non-zero response are quite right skewed. Now what i