[R] Pseudo-Voigt fit

From: <ppancoska_at_notes.cc.sunysb.edu>
Date: Sat 27 Aug 2005 - 05:08:38 EST

Hi, I am sorry for this question, but I am trying to speed up an application....
I will need to fit many x-y data sets (input from text files) to 4-parameter Pseudo-Voigt peak function.
Until now I used SigmaPlot macro to do it (enclosed just in case...)

peaksign(q) = if(total(q)>q[1], 1, -1)
xatymin(q,r) = xatymax(q,max(r)-r)

a = if(peaksign(y)>0, max(y), min(y)) ''Auto {{previous: 60.8286}}
b = fwhm(x,abs(y))/2 ''Auto {{previous: 0.656637}}
c = .5 ''Auto {{previous: 6.82973e-010}}
x0 = if(peaksign(y)>0, xatymax(x,y), xatymin(x,y)) ''Auto {{previous: 3.19308}}


f = a*(c*(1/(1+((x-x0)/b)^2))+(1-c)*exp(-0.5*((x-x0)/b)^2))

fit f to y

 (manageable for ~100), but it looks like the next project would need to process ~1000 member sets.

I am not as familiar with R to find the right info (although I can use R in general).

I am also nearly sure that there should be a solution to this task "out there" ready to be modified...

Could you be so kind and direct me please to the right package or web-site with examples?

Thank you very much

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.

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Aug 27 05:21:11 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:56 EST