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 -- Kristian Omland Postdoctoral Research Associate Vermont Cooperative Fish & Wildlife Research Unit Rubenstein School of Environment & Natural Resources University of Vermont Burlington VT 05405 voice: (802)656-2496 fax: (802)656-8683 web page: http://www.uvm.edu/~komland
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/
Hi all, Here is a summary of substantive replies to my posts (on both s-news and r-help) regarding use of Excel's Solver for a nonlinear regression problem. A number of people replied that Solver performs well as an optimizer based on experience, particularly if given reasonable starting values. A number of other people replied that it performs poorly based on experience. Whether or not it arrives at a bona fide solution, several people pointed out limitations to using Solver associated with lack of diagnostics and related statistical output. When using Solver, you cannot "trace the internals" of the solving process, and you cannot obtain the Hessian matrix or variance-covariance matrix. One user stated that he sometimes uses Excel's Solver to analyze the same problem he has previously done in S+ or R; if it arrives at the same answer, he's happy. I was also reminded of several general advantages of using a command line language (ease of debugging, portability to other problems or other users, etc.). Adding my own comment, that general issue applies to using Solver in that it is impossible (I think) to tell after the fact what options were selected for the optimization. The consensus was that someone in my shoes would do well to learn S+/R, or AD Model Builder ... but then you're all proficient in S+/R already :-) Thanks for your input, Kristian -- Kristian Omland Postdoctoral Research Associate Vermont Cooperative Fish & Wildlife Research Unit Rubenstein School of Environment & Natural Resources University of Vermont Burlington VT 05405 voice: (802)656-2496 fax: (802)656-8683 web page: http://www.uvm.edu/~komland