ct: Re: [R] multiple peak fit
Petr,
You could use nonlinear regression to fit two Guassian peaks. For example,
fit <- nls(sig ~ d + a1*exp(-0.5*((time-c1)/b1)^2) +
a2*exp(-0.5*((time-c2)/b2)^2),
start=list(a1=15, b1=20, c1=315, a2=4, b2=50, c2=465, d=1.5),
data=temp)
plot(temp
Petr,
You could use nonlinear regression to fit two Guassian peaks. For example,
fit <- nls(sig ~ d + a1*exp(-0.5*((time-c1)/b1)^2) +
a2*exp(-0.5*((time-c2)/b2)^2),
start=list(a1=15, b1=20, c1=315, a2=4, b2=50, c2=465, d=1.5), data=temp)
plot(temp, type="l")
lines(temp$time, predict(fit), lty=2
Hi
I went through some extensive search to find suitable method (package,
function) to fit multiple peaks. The best I found is ALS package but it
requires rather complicated input structure probably resulting from GC-MS
experimental data and seems to be an overkill to my problem.
I have basica
3 matches
Mail list logo