A bug in regression predicted values

Everything related to the development of modules in jamovi
Post Reply
simonmoon
Posts: 17
Joined: Thu Oct 27, 2022 3:45 pm

A bug in regression predicted values

Post by simonmoon »

I was preparing a seminar and accidentally stumbled upon an odd situation in SPSS. When there is a negative relationship between the predictor and the dependent variable in a simple regression, the calculated predicted value showed a negative perfect correlation (-1) with the original predictor in SPSS. This is a non-sense. When I draw the scatterplot between the IV (Positive Affectivity) and DV (Depression), it clearly showed a strong negative trend. But, when I draw the scatterplot in regression menu in SPSS using the predicted value on X and the DV on Y, the scatterplot showed a strong positive trend, which is also wrong.

I thought that the SPSS was in error and checked the same issue using jamovi. Well, surprisingly, I see exactly the same issue. The calculated predicted values showed a -1 correlation with the original predictor. When the IV and DV are positively related, I could not see the same issue. Please see the attached file.
Attachments
Regression Example File for jamovi forum.omv
(8.79 KiB) Downloaded 118 times
simonmoon
Posts: 17
Joined: Thu Oct 27, 2022 3:45 pm

Re: A bug in regression predicted values

Post by simonmoon »

I got the answer from other forums. I missed something big. Because the relationship between the IV and the DV is negative, the predicted value should have a negative relationship with the IV. Sorry, it is not a bug. I found a big missing piece in my understanding.
Bobafett
Posts: 76
Joined: Thu Jul 18, 2019 11:33 am

Re: A bug in regression predicted values

Post by Bobafett »

simonmoon wrote: Wed Jun 14, 2023 4:45 am I got the answer from other forums. I missed something big. Because the relationship between the IV and the DV is negative, the predicted value should have a negative relationship with the IV. Sorry, it is not a bug. I found a big missing piece in my understanding.
As you've probably realised, the R value isn't so much a correlation between your IV and DV (though it mimics this for simple regressions) but rather a correlation between your DV and your predicted DV scores based on your IV(s) - your 'model' as it were. Hence it should always come out as a positive relationship.
Post Reply