Skip to content

Pseudo-Voigt fit

2 messages · Spencer Graves, ppancoska@notes.cc.sunysb.edu

#
I haven't seen a reply to this question, so I will attempt a few 
remarks in spite of some confusion about what you are asking.

	  1.  The function to use for parameter estimation depends on ths 
structure of the data.  My all-around preference for many purposes is 
for "optim", but I've used "nls", "fitdistr" (in the MASS package) and 
others in different circumstances.

	  2.  If you are doing nonlinear estimation with, e.g., optim, I 
suggest you request "hessian=TRUE".  The eigenvalues of the hessian will 
tell you if it is ill conditioned.  If it is, you might consider 
reparameterizing the model.

	  3.  I try to avoid using reserved words like "c".  R can often 
determine what you want from the context, but there are exceptions.  I 
try to avoid that problem by testing a name at a command prompt before I 
use it.  If it returns, "object not found", I'm fine;  if not, I try 
something different.

	  4.  Following the posting guide! 
"http://www.R-project.org/posting-guide.html" can on average increase 
the likelihood that you will receive helpful suggestions quickly.  (I've 
learned that people rarely respond to my incoherent screams;  when they 
do, it's rarely helpful.  I've reluctantly learned that there is often 
no substutute for reading the *#@%* manual.)

	  I'd be shocked if this answered your question, but I hope it is 
helpful nonetheless.
	
	  spencer graves
ppancoska at notes.cc.sunysb.edu wrote:

            

  
    
#
Dear colleagues,
thank you very much for help.
I have got the most efficient message (?nls) from Bert Gunter and I took
off from there and now the routine is up and running with results validated
and doing exactly what SigmaPlot did.
It required intense "...reading the *#@%* manual...." as Spencer suggests
below, but it was worth of the effort! I am actually amazed how easily - in
many cases - one can find the right segment in the documentation even after
only partial reading of all those pages. But sometimes even the real
ingenuity of designers in naming all those functions cannot switch on that
intuition "radar" to navigate where one would like (or has to) be. Mea
maxima culpa....

Thanks again.


Petr P.

Dr. Petr Pancoska
Department of Pathology
SUNY Stony Brook, NY 11794
phone:          (631)-444-3030

******************************************************************************

This e- mail message, including any attachments,
is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender
by e-mail and destroy all copies of the original.
******************************************************************************


                                                                           
             Spencer Graves                                                
             <spencer.graves at p                                             
             df.com>                                                    To 
                                       ppancoska at notes.cc.sunysb.edu       
             09/01/2005 10:17                                           cc 
             PM                        r-help at stat.math.ethz.ch            
                                                                   Subject 
                                       Re: [R] Pseudo-Voigt fit            
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




               I haven't seen a reply to this question, so I will attempt a
few
remarks in spite of some confusion about what you are asking.

               1.  The function to use for parameter estimation depends on
ths
structure of the data.  My all-around preference for many purposes is
for "optim", but I've used "nls", "fitdistr" (in the MASS package) and
others in different circumstances.

               2.  If you are doing nonlinear estimation with, e.g., optim,
I
suggest you request "hessian=TRUE".  The eigenvalues of the hessian will
tell you if it is ill conditioned.  If it is, you might consider
reparameterizing the model.

               3.  I try to avoid using reserved words like "c".  R can
often
determine what you want from the context, but there are exceptions.  I
try to avoid that problem by testing a name at a command prompt before I
use it.  If it returns, "object not found", I'm fine;  if not, I try
something different.

               4.  Following the posting guide!
"http://www.R-project.org/posting-guide.html" can on average increase
the likelihood that you will receive helpful suggestions quickly.  (I've
learned that people rarely respond to my incoherent screams;  when they
do, it's rarely helpful.  I've reluctantly learned that there is often
no substutute for reading the *#@%* manual.)

               I'd be shocked if this answered your question, but I hope it
is
helpful nonetheless.

               spencer graves
ppancoska at notes.cc.sunysb.edu wrote:

            
in
web-site
******************************************************************************
http://www.R-project.org/posting-guide.html

--
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA

spencer.graves at pdf.com
www.pdf.com <http://www.pdf.com>
Tel:  408-938-4420
Fax: 408-280-7915