0:00 okay in this video I'm going to review a
0:03 couple of macros that you can download
0:05 from the web for use with SPSS in order
0:09 to carry-out
0:10 regression analysis using robust
0:12 standard errors basically when you run
0:17 regression analysis through the standard
0:20 approach just a standard linear
0:23 regression it doesn't take into account
0:26 the possibility that you might have
0:29 heteroscedasticity in terms of your
0:31 residuals and if that is the case and
0:34 what that can do it may not it won't
0:36 bias your regression coefficients but it
0:39 can lead to biases in terms of the
0:41 standard errors and ultimately your
0:43 significance tests and confidence
0:45 intervals so this is basically a major
0:48 reason why we care about this particular
0:52 issue so what I'm going to do is I'm
0:56 going to review two macros in particular
0:58 the first one is Andrew Hayes macro he
1:02 has it on his website basically on his
1:05 book website it looks like there's a new
1:07 book out regression analysis and linear
1:09 models and at this particular downloaded
1:12 spot you can download a zip file
1:14 containing the R ALM macro and you can
1:20 install it to SPSS and then be able to
1:23 run it straight from there so in order
1:26 to do that if you just download it from
1:28 there you'll just go to extensions go to
1:32 utilities install custom dialog and I
1:36 basically have my I have it saved under
1:40 a certain folder here if you click on
1:42 this folder here go down to our LM macro
1:45 and click on it there's there's the
1:48 macro click on open it'll install it to
1:51 your program and so you can see it's
1:53 it's installed right here as as our LM
1:57 macro by Andrew Hayes so that's the
1:59 first one I'm going to demonstrate the
2:01 second one actually comes from this
2:04 website right here and I just happened
2:07 upon it by when I
2:09 ran across this YouTube video explaining
2:12 it and the nice thing about this
2:15 particular macro is it also allows you
2:18 to generate robust standard errors for
2:20 your regression analysis but it also
2:22 incorporates the brush of pagan test and
2:25 the cannot connect or test which are
2:28 basically utilized in the evaluation of
2:30 the homoscedasticity of variance
2:35 assumption so our constant variance
2:37 assumption so the basic idea is that if
2:40 you find statistical significance for in
2:45 terms of these tests right here that
2:48 would be an indicator that you have
2:50 heteroscedasticity which would call into
2:52 question perhaps the use of the standard
2:56 least squares regression that does not
2:58 make any kind of adjustments to the
3:00 standard errors and so that's so with
3:03 this program though you can also ask for
3:06 heteroscedasticity adjusted standard
3:10 errors so making them essentially robust
3:13 standard errors so I'm gonna walk
3:15 through both of these programs right
3:17 here are macros so and I've it installed
3:20 that pretty much doing the same thing
3:22 that did with Andrew Hayes's and you'll
3:24 see the under regression I've got it
3:26 right here heteroscedasticity test and
3:30 so at this point we'll run those
3:33 analyses I also have on here Andrew
3:38 Hayes is older macro the H basically
3:43 it's an older approach to giving robust
3:47 standard errors and that is actually
3:50 coming from this macro down here so you
3:54 might find it HC reg this is just a much
3:58 more drilled drilled down version of
4:00 what you would get with respect to this
4:04 particular macro so as he says on his
4:06 website it's becoming obsolete with the
4:08 release of the R LM so but I will just
4:12 kind of show that as a point of contrast
4:14 so you can see what it looks like so for
4:17 starters let's start with Andrew Hayes's
4:20 macro so we're going to go to animal
4:22 as good a regression rlm macro by Andrew
4:26 Hayes now first of all really quickly
4:28 the the basic model that we're going to
4:30 be looking at we have a dependent
4:32 variable which will be achieved and we
4:34 have a set of independent variables
4:35 right here so gender something matter
4:37 interest mastery goals and anxiety and
4:39 so I'm gonna move achieve which is going
4:42 to be my dependent variable to this box
4:44 and move the remaining variables over to
4:47 the regressors box I can ask for
4:50 standardized coefficients I can ask for
4:53 you know a number of different things
4:54 one of the kind of cool things about
4:56 this particular macro is you can even
4:59 get all subsets regression that's really
5:01 pretty slick and if you want regression
5:05 Diagnostics you know basically cut you
5:08 know in the same way that you might get
5:10 if you're running the analysis through
5:11 regression just standard regression
5:13 module and click on safe you know you
5:16 can ask for various things like
5:17 Mahalanobis and cooks D and and things
5:19 like that you can get some of that
5:21 through this macro as well so basically
5:24 will do so create a new file that would
5:27 incorporate some of those those
5:29 diagnostic indicators so so you don't
5:34 actually have to do it I'm just saying
5:36 that you you know it is available to you
5:38 so I'm gonna I'm just gonna stick with
5:39 this right here notice the confidence
5:41 interval is already defaulted at 95%
5:43 there are other options if you want it
5:46 and down here where it says covariance
5:48 estimator
5:49 HC so if I click on this there are
5:51 various adjustments to the standard
5:55 errors and I'm going to pivot off of a
5:58 haze in Kies 2007 article where they
6:02 actually recommended using either the HC
6:04 3 or HC 4 estimators so I'm going to use
6:08 HC 3 so I'm going to click on this go
6:11 down to HC 3 and at this point I'll
6:14 click on OK and so you can see we've got
6:19 several you know a number of pieces of
6:21 information we have the multiple are
6:22 right here the r-square value the f-test
6:26 and you know there's our p-value for
6:29 testing the significance related to our
6:32 square down here where it says
6:34 regression model you can see we have the
6:36 efficients and then a column containing
6:39 SC and so these are the robust standard
6:41 errors using that particular adjustment
6:44 that means that them that the t-value
6:46 p-values and confidence intervals are
6:49 all going to be reflecting the
6:51 adjustment to the standard errors so if
6:55 you scroll down a little bit further you
6:57 can see we've got we also asked for
7:00 those standardized assessments including
7:01 the correlation simple correlation
7:03 between each of the end of the
7:05 independent variables and the dependent
7:06 variable semi partial correlations and
7:09 then partial correlations right here and
7:11 then these would be your standard as
7:13 regression weights or you know basically
7:15 we call them beta weights so at any rate
7:19 that's you know that's what we have
7:21 right there if we want to compare this
7:23 just against what you would get in terms
7:27 of the standard errors we just run our
7:28 analysis I'm going to take these off run
7:31 our analysis without the adjustment you
7:33 can see the difference the for the
7:36 standard error is the standard error for
7:37 model one well for our model that for
7:40 the intercept is thirty three point nine
7:42 seven eight you can see it's forty seven
7:45 point nine one nine for gender it's one
7:47 point eight forty nine versus two point
7:51 one then 0.195 for the for the next one
7:56 is versus point one nine oh so you can
7:58 see that these standard errors in this
8:00 in this column right here tend to be a
8:02 little bit larger than those that we
8:04 have when we don't adjust for the
8:08 possibility of heteroscedasticity so at
8:13 any rate there you go
8:15 so that's kind of the difference that
8:17 you that you get right there let me just
8:19 show you one more time let's just I'll
8:22 show you what to get if you click on
8:23 regression Diagnostics will click on
8:26 okay and what you'll see it's just going
8:28 to be the same output but now it
8:30 generates a new file that contains all
8:33 of our variables as well as Diagnostics
8:35 and so you can see you know here we've
8:37 got the fitted values residuals hella
8:40 novus distance Kooks D and so forth
8:43 that's that's essentially Andrew Hayes's
8:47 macro
8:49 the new one the old one by the way it
8:51 looks like this if we want to use that
8:54 one the H see we're Greg regression when
8:59 basically you can see right here we
9:02 would just be putting our T variable
9:04 into the dependent box gender and
9:07 through anxiety into the predictors box
9:09 you can click on HC method and I've
9:12 already got set for HC three and so
9:15 that's the difference right there so
9:17 it's quite a difference in terms of
9:20 what's printed out but you see that we
9:21 have our F test right here the standard
9:24 errors the robust standard errors the
9:27 the T tests and the p-values all those
9:30 reflecting the adjustments for any kind
9:35 of heteroscedasticity they may be
9:36 present okay so that that takes care of
9:39 Andrew Hayes's version now we're going
9:42 to go to this one right here what we're
9:44 going to look at that and and again the
9:48 nice thing about this particular macro
9:50 is it does incorporate tests for
9:54 heteroscedasticity the brush pagan and
9:56 conic er test and and basically to carry
10:02 out that analysis once you've installed
10:04 it we're gonna go to analyze go to
10:07 regression and here it is so
10:09 heteroscedasticity test will click on it
10:11 and I'm just gonna reset it and just
10:14 kind of you know sometimes it's just
10:15 nice nice to have a visual walkthrough
10:17 so I'm just gonna put my independence in
10:19 the explanatory box outcome and the
10:22 achieve and the outcome box you can see
10:25 you've got the robust standard error
10:27 options hc3 I'm gonna click on OK and so
10:31 now you can see that here we've got the
10:34 standard least squares regression output
10:37 there's our R square value you can see
10:41 as before all of our regression
10:43 coefficients are exactly the same
10:45 whether we're using the default OLS
10:47 versus the heteroscedasticity robust
10:51 standard errors but you see the
10:52 differences lie in the column four
10:55 standard errors right here versus here
10:57 so we basically were able to generate
11:00 both of those using
11:02 and replaces macros and and then also
11:06 juxtaposing those against the standard
11:09 errors from the standard least squares
11:10 regression so then we have our T values
11:13 down here significance levels 95 percent
11:17 confidence intervals all down here in
11:19 this area adjusted for or after we've
11:23 adjusted the standard errors well scroll
11:25 down and you'll see that we have the
11:29 ANOVA summary table down here this looks
11:32 like this maybe from the standard least
11:35 squares regression priority any kind of
11:39 adjustments so that's something to kind
11:42 of note there when you look at Andrew
11:45 Hayes's F value that's printed out up
11:49 here you can see it's nine point zero
11:51 307 the FA from this macro is printed
11:57 out as far as it out there is nine point
12:01 five to four if we compare that with our
12:03 previous regression earlier on you can
12:06 see it's a nine point five to four so
12:08 that's where I'm getting that
12:10 supposition from okay so with the brush
12:14 pagan and Conacher tests I hope I'm
12:16 pronouncing that right I probably am not
12:19 but you can see down here that with
12:23 respect to those tests in this little
12:26 area we've got the the test results and
12:29 you've got the boys pagan test and the
12:32 concur tests these are the tests values
12:35 using a Lagrange multiplier test we have
12:39 significance levels right here and the
12:41 Pete you know basically if your p-values
12:44 are are greater than say 0.05
12:47 conventional alpha then we would assume
12:52 that the assumption of homoscedasticity
12:57 is met in other words the constant error
13:02 assumption is met if it's less than 0.05
13:05 then we would maybe infer that that we
13:08 violated that particular assumption just
13:10 keep in mind that these kinds of tests
13:12 are impacted by sample size and
13:15 you know the drill that the larger the
13:18 sample size the greater likelihood of
13:20 rejecting the null so just keep that in
13:24 mind as you're evaluating whether or not
13:25 you've violated or whether we violated
13:29 the assumption and can't use the
13:30 standard least squares regression if
13:33 it's so in this particular case it looks
13:35 like based on these tests or there's
13:38 evidence that we would not have violated
13:40 that assumption if we were using the
13:42 standard least squares regression so
13:43 that would call into question the need
13:46 to utilize adjusted standard errors or
13:49 robust standard errors in the way that
13:52 we have but you know also keep in mind
13:54 that this is like I said this is a
13:56 significance test it's probably not a
13:58 bad idea to also you know look at
14:00 residuals plots and so forth to further
14:03 evaluate whether the assumption is met
14:05 so at any rate that that pretty well
14:10 light lays it out for you and I hope you
14:14 find this useful that like I said these
14:17 are two really neat macros that are
14:19 available to you you know the nice thing
14:21 about Andrew Hayes macro the first one
14:24 is it does contain a lot more options in
14:27 terms of you know different types of
14:29 output and it does incorporate that nice
14:34 little aspect of the all subsets
14:37 regression if you choose to go with the
14:41 latter approach the nice thing is is
14:44 that you do get significance tests
14:46 related to you know testing the
14:50 assumption of constant variances but you
14:54 don't get quite as much in the way of
14:56 the individual output in other areas so
15:01 at any rate just uh I hope this I hope
15:04 you find this useful and good luck with
15:07 your research