[R] Fitting a logistic regression

Dani Valverde daniel.valverde at uab.cat
Wed Aug 19 12:04:27 CEST 2009


Hello,
I have this data:
  Time  AMP
     0 0.2000000
    10 0.1958350
    20 0.2914560
    40 0.6763628
    60 0.8494534
    90 0.9874526
   120 1.0477692

where AMP is the concentration of this metabolite with time. If you plot
the data, you can see that it could be fitted using a logistic
regression. For this purpose, I used this code:

AMP.nls <- nls(AMP~SSlogis(Time,Asym, xmid, scal), data =
concentrations,model=T)

When plotting the fitted function, it seems that it fits quite well at
the end of the time. However, at the beginning it seems that the fit is
not so good. How can I achieve a better fit? Forgive me if it is a
stupid question, but I am just starting with non linear regression.
Thank you,

Dani
-- 
[?]




More information about the R-help mailing list