error computation on projected values

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

error computation on projected values

Maguin, Eugene

A non-spss question.

Suppose N observations taken at three equally spaced time points. Run the data through regression and get an intercept and slope and standard errors for each. Now I want to predict a value at time point six and I want to put an error bar around it. My predicted value would be b0 + 6*b1. Would my error bar total width be 2*(se(b0) + 6*se(b1))? Or, might there be something to learn?

 

Thanks, Gene Maguin

===================== 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: error computation on projected values

Jon Peck
No.  The prediction error needs to account for the error variance as well as the estimation error.  You  can see the formula here.
It adds the 

Note that there is a difference between the prediction error for a point and the error for E(Y|X).

The easiest way to do this would be to save the prediction intervals of whichever type you want as variables from REGRESSION.  If you export the model, you can then apply it to new data and calculate the interval using the Scoring Wizard (on Utilities).

On Wed, Aug 12, 2020 at 8:09 AM Maguin, Eugene <[hidden email]> wrote:

A non-spss question.

Suppose N observations taken at three equally spaced time points. Run the data through regression and get an intercept and slope and standard errors for each. Now I want to predict a value at time point six and I want to put an error bar around it. My predicted value would be b0 + 6*b1. Would my error bar total width be 2*(se(b0) + 6*se(b1))? Or, might there be something to learn?

 

Thanks, Gene Maguin

===================== 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


--
Jon K Peck
[hidden email]

===================== 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: error computation on projected values

Rich Ulrich
In reply to this post by Maguin, Eugene
A total error is /not/ the sum of the errors of its two terms unless the
terms are uncorrelated ( r = 0 ). It is unlikely that a regression intercept
is uncorrelated with the regression coefficient unless it is designed that way.

And predicting beyond the range of the data raises other complications.

Jon's reference shows the difference between two types of prediction,
but the computation for each is apparently hidden in the call to routine
that does the estimating.

--
Rich Ulrich

From: SPSSX(r) Discussion <[hidden email]> on behalf of Maguin, Eugene <[hidden email]>
Sent: Wednesday, August 12, 2020 10:09 AM
To: [hidden email] <[hidden email]>
Subject: error computation on projected values
 

A non-spss question.

Suppose N observations taken at three equally spaced time points. Run the data through regression and get an intercept and slope and standard errors for each. Now I want to predict a value at time point six and I want to put an error bar around it. My predicted value would be b0 + 6*b1. Would my error bar total width be 2*(se(b0) + 6*se(b1))? Or, might there be something to learn?

 

Thanks, Gene Maguin

===================== 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
===================== 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: error computation on projected values

Jon Peck
The formulas are in the Algorithms Manual, but I think it would be much easier to just use the Scoring Wizard as I described.  However, for regression it provides a standard error, but it would take a little investigation to find out the type.

On Wed, Aug 12, 2020 at 11:27 AM Rich Ulrich <[hidden email]> wrote:
A total error is /not/ the sum of the errors of its two terms unless the
terms are uncorrelated ( r = 0 ). It is unlikely that a regression intercept
is uncorrelated with the regression coefficient unless it is designed that way.

And predicting beyond the range of the data raises other complications.

Jon's reference shows the difference between two types of prediction,
but the computation for each is apparently hidden in the call to routine
that does the estimating.

--
Rich Ulrich

From: SPSSX(r) Discussion <[hidden email]> on behalf of Maguin, Eugene <[hidden email]>
Sent: Wednesday, August 12, 2020 10:09 AM
To: [hidden email] <[hidden email]>
Subject: error computation on projected values
 

A non-spss question.

Suppose N observations taken at three equally spaced time points. Run the data through regression and get an intercept and slope and standard errors for each. Now I want to predict a value at time point six and I want to put an error bar around it. My predicted value would be b0 + 6*b1. Would my error bar total width be 2*(se(b0) + 6*se(b1))? Or, might there be something to learn?

 

Thanks, Gene Maguin

===================== 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
===================== 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


--
Jon K Peck
[hidden email]

===================== 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: error computation on projected values

Bruce Weaver
Administrator
Alternatively, just append a case with X = 6 and Y = missing, then estimate
your model and use SAVE to write the "Individual prediction interval" to the
data file.  

NEW FILE.
DATASET CLOSE ALL.
* Use a toy dataset to illustrate.
DATA LIST LIST/ x (F1) y (F8.4).
BEGIN DATA  
    1     .89715  
    1   .8501824  
    1   .7291672  
    1   .8694811  
    1   1.006577  
    2   1.476204  
    2   1.408788  
    2   1.742064  
    2   1.596571  
    2   1.958617  
    3   2.071737  
    3   2.382759  
    3   2.086987  
    3   2.074612  
    3   2.206594  
    6   -999
END DATA.

MISSING VALUES y (-999).

REGRESSION
  /STATISTICS COEFF OUTS CI(95) R ANOVA
  /DEPENDENT y
  /METHOD=ENTER x
  /SAVE MCIN ICIN.

* MCIN = CI for the mean of Y conditional on X.
* ICIN = CI for an individual Y conditional on X.  

* Compute the widths of the mean and individual prediction intervals.
COMPUTE MOE_M = UMCI_1 - LMCI_1.
COMPUTE MOE_I = UICI_1 - LICI_1.  

LIST.
* As expected, indivicual prediction intervals are wider.

Finally, here is a slide from my the deck I use when introducing simple
linear regression.  As it shows, the difference between the two equations is
just the presence of an extra 1 under the square root sign when computing
the "individual" prediction interval.  (That's what makes it wider.)  

Mean_v_individual_CI_in_OLS_regression.png
<http://spssx-discussion.1045642.n5.nabble.com/file/t7186/Mean_v_individual_CI_in_OLS_regression.png>  

Those who subscribe directly to the UGA mailing list may have to view this
thread via Nabble to view the uploaded file:

http://spssx-discussion.1045642.n5.nabble.com/error-computation-on-projected-values-td5739497.html

HTH.


Jon Peck wrote
> The formulas are in the Algorithms Manual, but I think it would be much
> easier to just use the Scoring Wizard as I described.  However, for
> regression it provides a standard error, but it would take a little
> investigation to find out the type.





-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

NOTE: My Hotmail account is not monitored regularly.
To send me an e-mail, please use the address shown above.

--
Sent from: http://spssx-discussion.1045642.n5.nabble.com/

=====================
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
--
Bruce Weaver
bweaver@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/

"When all else fails, RTFM."

PLEASE NOTE THE FOLLOWING: 
1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above.
2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/).