[R] Profile on optim/nlm

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Jan 23 14:28:07 CET 2003


Ah, you mean a method for profile() for an object fitted by optim or nlm!  
That's not any of the first five or so meanings I envisaged.
(Not that that can be exactly true, as the results from ms, optim and nlm 
are not classed.)

It's not at all difficult to cook one up: you just need to look at the
way arima uses optim with a variable subset of parameters held fixed.
Unlike S-PLUS, you can use lexical scoping (and arima does).  However,
I would rather profile a real fit class using a fit function based on 
optim.

On Thu, 23 Jan 2003, Steve Roberts wrote:

> Greetings,
> 
> Before I reinvent the wheel has anyone done a profile function for a 
> fit using optim (or nlm)?  (like the buggy profile.ms in S+) . It 
> seems a bit tricky as the function to be minimised has to have 
> arguments corresponding to the variables being fitted - which is one 
> less than the function provided to optim()... I guess you can create 
> another function on the fly somehow.
> 
> Cheers,
> 
> Steve.
> Dr Steve Roberts 
> steve.roberts at man.ac.uk
> 
> Biostatistics Group,				
> School of Epidemiology and Health Sciences,	
> 2nd Floor,Stopford Building,			
> University of Manchester.			
> M13 9PT.					
> Tel: 0161 275 5192 FAX: 0161 275 5205
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list