nonlinear regression and Excel solver
Hi, I don't know S-Plus and its functions nlminb() and ms(). However, in R I would use optim(), optimize or nlm(). I used these functions quiet often and had only very few problems. I think that R is better, easier and more flexible than Excel (at least in the long run), but since I don't anything about the Lefkovitch matrix framework I might be wrong in this case. Best wishes, Arne
On Wednesday 14 January 2004 19:57, Kristian Omland wrote:
Hi all, Earlier today I posted this question on s-news, so apologies to some for the duplication.
Please put aside your snobbery about Microsoft products for a moment. I am fitting population models to annual survey data for trout. For those of you familiar with ecological models, I am working in the Lefkovitch matrix framework; for those unfamiliar with that shorthand, the modeled variable is a vector of abundances of fish in five size classes, with a system of linear equations (represented by a matrix) governing survival, advancement from smaller to larger stages, and reproduction. So far, I have been using a likelihood approach in an Excel spreadsheet. The spreadsheet includes the annual survey data, the Lefkovitch matrix, and projections of the model, i.e., realizations to be compared to the data. It computes the negative log-likelihood of each realization assuming log-normally distributed noise and the sum of those likelihood components. I use the Solver add-in to minimize the negative log-likelihood over the parameters in the Lefkovitch matrix. I have made a tentative stab at using nlminb() [minor success] and ms() [no success] to fit the model in S-Plus, but my proficiency is such that I still have greater flexibility fitting the models with Excel. Thus my question for you all is ... Is Excel?s Solver an adequate tool for numerical approximation in general and nonlinear regression in particular? Or should I push on writing S-Plus code? Is anyone out there interested in assisting me with S-Plus code with the potential payoff of collaboration on a publication in the ecological literature?
Obviously, I would be equally enthused if an R user was interested in a collaboration. Thanks in advance, Kristian
Arne Henningsen Department of Agricultural Economics University of Kiel Olshausenstr. 40 D-24098 Kiel (Germany) Tel: +49-431-880 4445 Fax: +49-431-880 1397 ahenningsen at agric-econ.uni-kiel.de http://www.uni-kiel.de/agrarpol/ahenningsen/