Nonlinear regression question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Nonlinear regression question

David Greenberg
I am trying to use the nonlinear regression capabilities in IBM SPSS
version 20 to estimate a population growth model in which the
dependent variable is the total US population, and time is measured in
decades. With models having three parameters, I get a message saying
that there is a negative error variance, and the estimation stops with
1 iteration. I am using the same model and start values that have run
successfully in earlier versions of SPSS. The predicted values are all
zero. To determine what might be wrong I have simplified the model so
that a variable defined as the logarithm of population. lnpop, grows
linearly with time. This should be easy to estimate. Here is the
syntax:
* NonLinear Regression.
MODEL PROGRAM  b1=4 b2=.3.
COMPUTE  PRED_=lnpop =b1 + b2*decade.
NLR lnpop
  /OUTFILE='C:\Users\GREENB~1\AppData\Local\Temp\spss3472\SPSSFNLR.TMP'
  /PRED PRED_
  /SAVE PRED RESID
  /CRITERIA SSCONVERGENCE 1E-8 PCON 1E-8.


Here are selections from my output:

Parameter Estimates
Parameter       Estimate        Std. Error      95% Confidence Interval
                        Lower Bound     Upper Bound
b1      4.000   .000    4.000   4.000
b2      .300    .000    .300    .300

Correlations of Parameter Estimates
        b1      b2
b1      .       .
b2      .       .

ANOVAa
Source  Sum of Squares  df      Mean Squares
Regression      .000    2       .000
Residual        375.674 20      18.784
Uncorrected Total       375.674 22
Corrected Total 37.583  21
Dependent variable: lnpop
a R squared = 1 - (Residual Sum of Squares) / (Corrected Sum of Squares) = ..



I believe that the three-parameter model came from an SPSS manual
published back in the days when SPSS
was producing them. What am I doing wrong?
      - David Greenberg, Sociology Department, NYU

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

SPSS Statistics manuals [was Re: Nonlinear regression question]

Alex Reutter
Hi David,

Glad you figured out what was going wrong.

Regarding the v20 manuals, I wanted to point out that while the physical manuals are no longer produced, v20 has an information center at http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/index.jsp that links to PDFs of all the manuals (first link in the main pane) and also hosts the entire help system (see the table of contents and search field in the left pane).  If you're thinking of the list of common models, for example, that's at http://publib.boulder.ibm.com/infocenter/spssstat/v20r0m0/topic/com.ibm.spss.statistics.help/cmd_nlr_models.htm.

Cheers,
Alex



From:        David Greenberg <[hidden email]>
To:        [hidden email]
Date:        02/01/2012 12:34 AM
Subject:        Nonlinear regression question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




I am trying to use the nonlinear regression capabilities in IBM SPSS
version 20 to estimate a population growth model in which the
dependent variable is the total US population, and time is measured in
decades. With models having three parameters, I get a message saying
that there is a negative error variance, and the estimation stops with
1 iteration. I am using the same model and start values that have run
successfully in earlier versions of SPSS. The predicted values are all
zero. To determine what might be wrong I have simplified the model so
that a variable defined as the logarithm of population. lnpop, grows
linearly with time. This should be easy to estimate. Here is the
syntax:
* NonLinear Regression.
MODEL PROGRAM  b1=4 b2=.3.
COMPUTE  PRED_=lnpop =b1 + b2*decade.
NLR lnpop
 /OUTFILE='C:\Users\GREENB~1\AppData\Local\Temp\spss3472\SPSSFNLR.TMP'
 /PRED PRED_
 /SAVE PRED RESID
 /CRITERIA SSCONVERGENCE 1E-8 PCON 1E-8.


Here are selections from my output:

Parameter Estimates
Parameter       Estimate        Std. Error      95% Confidence Interval
                       Lower Bound     Upper Bound
b1      4.000   .000    4.000   4.000
b2      .300    .000    .300    .300

Correlations of Parameter Estimates
       b1      b2
b1      .       .
b2      .       .

ANOVAa
Source  Sum of Squares  df      Mean Squares
Regression      .000    2       .000
Residual        375.674 20      18.784
Uncorrected Total       375.674 22
Corrected Total 37.583  21
Dependent variable: lnpop
a R squared = 1 - (Residual Sum of Squares) / (Corrected Sum of Squares) = ..



I believe that the three-parameter model came from an SPSS manual
published back in the days when SPSS
was producing them. What am I doing wrong?
     - David Greenberg, Sociology Department, NYU

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


Reply | Threaded
Open this post in threaded view
|

Re: Nonlinear regression question

David Marso
Administrator
In reply to this post by David Greenberg
Looks like you entered lnpop =b1 + b2*decade into the 'model expression' box.
Should be b1 + b2*decade ;-)
--
David Greenberg wrote
I am trying to use the nonlinear regression capabilities in IBM SPSS
version 20 to estimate a population growth model in which the
dependent variable is the total US population, and time is measured in
decades. With models having three parameters, I get a message saying
that there is a negative error variance, and the estimation stops with
1 iteration. I am using the same model and start values that have run
successfully in earlier versions of SPSS. The predicted values are all
zero. To determine what might be wrong I have simplified the model so
that a variable defined as the logarithm of population. lnpop, grows
linearly with time. This should be easy to estimate. Here is the
syntax:
* NonLinear Regression.
MODEL PROGRAM  b1=4 b2=.3.
COMPUTE  PRED_=lnpop =b1 + b2*decade.
NLR lnpop
  /OUTFILE='C:\Users\GREENB~1\AppData\Local\Temp\spss3472\SPSSFNLR.TMP'
  /PRED PRED_
  /SAVE PRED RESID
  /CRITERIA SSCONVERGENCE 1E-8 PCON 1E-8.


Here are selections from my output:

Parameter Estimates
Parameter       Estimate        Std. Error      95% Confidence Interval
                        Lower Bound     Upper Bound
b1      4.000   .000    4.000   4.000
b2      .300    .000    .300    .300

Correlations of Parameter Estimates
        b1      b2
b1      .       .
b2      .       .

ANOVAa
Source  Sum of Squares  df      Mean Squares
Regression      .000    2       .000
Residual        375.674 20      18.784
Uncorrected Total       375.674 22
Corrected Total 37.583  21
Dependent variable: lnpop
a R squared = 1 - (Residual Sum of Squares) / (Corrected Sum of Squares) = ..



I believe that the three-parameter model came from an SPSS manual
published back in the days when SPSS
was producing them. What am I doing wrong?
      - David Greenberg, Sociology Department, NYU

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"