2
$\begingroup$

I have a question about hypothesis testing for OLS linear regression with standardization in SPSS and R. Basically, in SPSS output, it will automatically present a column for standardized regression coefficients for each predictor (in the case of multiple regression). But, I am not sure whether the hypothesis testing in SPSS was done prior to predictors been standardized.

According to Darlington and Hayse (2017), they stated that "In a model with more than one regressor, the standardized partial regression coefficient for regressor j is the regression coefficient for Xj when Y and Xj are standardized prior to running the regression" (page 73, line 3 from the bottom).

Given this suggestion, I ran two models using R. The initial model was unstandardized (see out put below). NOTE: the variable of X1 is a 3-level factor

Call:

lm(formula = Y ~ X1 + X2 + X3 + X4, data = df)

Residuals:
     Min       1Q   Median       3Q      Max 
-2.28601 -0.68905 -0.04629  0.57432  2.60303 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)
(Intercept)     2.90208    0.65629   4.422 1.73e-05 ***
X1D1            0.50992    0.19816   2.573   0.0109 *  
X1D2            0.18424    0.18790   0.981   0.3282    
X2              0.04491    0.05449   0.824   0.4109    
X3              0.35130    0.05177   6.786 1.81e-10 ***
X4             -0.41892    0.09805  -4.272 3.20e-05 ***    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.9992 on 171 degrees of freedom
Multiple R-squared:  0.4143,    Adjusted R-squared:  0.3972 
F-statistic: 24.19 on 5 and 171 DF,  p-value: < 2.2e-16

When I ran the second model, I followed with the guideline suggested by Darlington and Hayse (2017). I first standardized the response variable Y and predictor X2, X3, and X4 using the scale() function. I then ran the model again, and the results were different from the initial model, see out below:

Call:
lm(formula = Y ~ X1 + X2 + X3 + X4, data = df)

Residuals:
     Min       1Q   Median       3Q      Max 
-1.77626 -0.53540 -0.03597  0.44626  2.02259 

Coefficients:
                 Estimate Std. Error t value Pr(>|t|)    
(Intercept)      -0.18527    0.10812  -1.713   0.0884 .  
X1D1              0.39622    0.15397   2.573   0.0109 *  
X1D2              0.14316    0.14600   0.981   0.3282    
X2                0.05235    0.06351   0.824   0.4109    
X3                0.42343    0.06240   6.786 1.81e-10 ***
X4               -0.27203    0.06367  -4.272 3.20e-05 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.7764 on 171 degrees of freedom
Multiple R-squared:  0.4143,    Adjusted R-squared:  0.3972 
F-statistic: 24.19 on 5 and 171 DF,  p-value: < 2.2e-16

I ran the initial model on SPSS and yielded the same result as my initial model (unstandardized) ran with R. But, my standardized model displays a completely different story. Based on my understanding, hypothesis testing is dependent on standard error (SE), which helps calculate confidence interval. Theoretically, whether a standardization was done or not should not interfere with hypothesis testing, but maybe my understanding is incorrect. It would be much appreciated if someone can help me figure out what this is going on. Thank you in advance for your time!!

$\endgroup$
  • 1
    $\begingroup$ Some are voting to close as off-topic, probably because all the code makes it look superficially a coding question. But It is not, it is perfectly on-topic $\endgroup$ – kjetil b halvorsen May 14 '18 at 9:31
3
$\begingroup$

Why do you think the results are different?

The estimates and standard errors, of course, are different. But for hypothesis testing you look at the t-value and p-value, those are exactly equal (except for the intercept, see below), as they should be. So every hypothesis test should give the same result in the two cases (the intercept is seldom of interest for hypothesis testing).

Residual standard errors are different (that is because you scaled also Y). For the same reason, t-value and p-value differs for the intercept (only), that is because scaling and centering Y changes the definition of the intercept. (the scale() function by default also centers).

Also, multiple R-squared, adjusted R-squared and F-test are all identical, as they should be. So the two models should give identical predictions, too.

$\endgroup$
  • 1
    $\begingroup$ Hi, kjetil, greatly appreciated your response. It does make more sense to me now. My misinterpretation on the intercept led me to the confusion. But, now your detailed response does help me clear things up. Thanks again!!! $\endgroup$ – adonies May 14 '18 at 18:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.