Date: Wed, 28 Dec 2011 07:15:19 -0800
Reply-To: David Marso <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: David Marso <email@example.com>
Subject: Re: Fitting logistic curve to growth data
Content-Type: text/plain; charset=UTF-8
See the NLR (Non Linear Regression) Procedure.
Following is an example of simulated data and the set up and results of NLR.
Note that the parameter estimates used to generate the data are recovered
You will wish to consult the docs on how to set up and run NLR from the
COMPUTE #K=1.5 .
COMPUTE #i= 1.7 .
LOOP ID=1 TO 1000.
COMPUTE d= Uniform(1)+4.
COMPUTE Y=#A/(1+EXP(-#K * (d-#i)))+ UNIFORM(.01).
END INPUT PROGRAM.
/SCATTERPLOT(BIVAR)=d WITH y
* NonLinear Regression.
MODEL PROGRAM A=3 K=1 I=1 .
COMPUTE PRED_ = A/(1+EXP(-K * (d-I))).
/CRITERIA SSCONVERGENCE 1E-8 PCON 1E-8 .
All the derivatives will be calculated numerically.
Iteration Residual SS A K I
1 1064.692791 3.00000000 1.00000000 1.00000000
1.1 1.348304567 3.99063649 1.49442721 1.88384875
2 1.348304567 3.99063649 1.49442721 1.88384875
2.1 .0146986193 4.00583423 1.47908955 1.69332655
3 .0146986193 4.00583423 1.47908955 1.69332655
3.1 .0080481338 4.00572338 1.47960600 1.66912002
4 .0080481338 4.00572338 1.47960600 1.66912002
4.1 .0080459976 4.00572123 1.47971278 1.66884117
5 .0080459976 4.00572123 1.47971278 1.66884117
5.1 .0080459976 4.00572119 1.47971372 1.66884238
Run stopped after 10 model evaluations and 5 derivative evaluations.
Iterations have been stopped because the relative reduction between
residual sums of squares is at most SSCON = 1.000E-08
Nonlinear Regression Summary Statistics Dependent Variable Y
Source DF Sum of Squares Mean Square
Regression 3 15524.41480 5174.80493
Residual 997 8.045998E-03 8.070208E-06
Uncorrected Total 1000 15524.42285
(Corrected Total) 999 .74860
R squared = 1 - Residual SS / Corrected SS = .98925
Asymptotic 95 %
Asymptotic Confidence Interval
Parameter Estimate Std. Error Lower Upper
A 4.005721193 .001171063 4.003423162 4.008019224
K 1.479713721 .026491205 1.427728805 1.531698638
I 1.668842378 .036748380 1.596729333 1.740955424
Asymptotic Correlation Matrix of the Parameter Estimates
A K I
A 1.0000 -.9791 -.9656
K -.9791 1.0000 .9981
I -.9656 .9981 1.0000
> Hi all,
> I need to fit a curve to data on mass gain, which follows a sigmoidal
> pattern and is best described using a logistic equation (based on similar
> published data, with which I wish to compare my data) of the form:
> Y = A/(1 + e^-K(d-i))
> where Y = mass
> A = asymptotic mass
> K = growth rate
> d = age (time)
> i = inflection point
> (note ^ indicates to the power)
> The data I have are body mass recorded daily for several individuals
> (nestling birds), which will be analysed separately.
> I need to output the parameters (A, K, i) rather than just produce a
> curve. I've searched the archives and Google but haven't found
> instructions for how to do this (I have instructions for running this in
> GENSTAT but of course do not have GENSTAT).
> Any help would be great...but beware I am a drop-down menus and buttons
> person when it comes to software :-)
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Fitting-logistic-curve-to-growth-data-tp5105041p5105450.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
For a list of commands to manage subscriptions, send the command