Dear SPSS experts, Can you please suggest how to test if there are significant differences in the B coefficients of the Multiple Linear Regression across two independent groups? Thank you in advance. Eins. |
Administrator
|
I assume you have the raw data for both groups? If so, compute a product term = Group indicator x the variable in question (I'll call it A). Then run a model using the data for both groups, and include the Group indicator variable and the Group x A product. The t-test for the Group x A product (in your table of coefficients) tests the null hypothesis that the effect of A is the same in both groups.
If you do not have the raw data, but have the required summary data, you can use syntax file number 4 here (replace the sample data with your own): https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/weaver_wuensch HTH.
--
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/). |
If you want an F test for multiple variables,
see the TEST keyword on the REGRESSION METHOD subcommand.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Bruce Weaver <[hidden email]> To: [hidden email], Date: 12/13/2013 09:04 AM Subject: Re: [SPSSX-L] Testing significant differences in Linear Regression B coefficients Sent by: "SPSSX(r) Discussion" <[hidden email]> I assume you have the raw data for both groups? If so, compute a product term = Group indicator x the variable in question (I'll call it A). Then run a model using the data for both groups, and include the Group indicator variable and the Group x A product. The t-test for the Group x A product (in your table of coefficients) tests the null hypothesis that the effect of A is the same in both groups. If you do not have the raw data, but have the required summary data, you can use syntax file number 4 here (replace the sample data with your own): https://sites.google.com/a/lakeheadu.ca/bweaver/Home/statistics/spss/my-spss-page/weaver_wuensch HTH. E. Bernardo wrote > Dear SPSS experts, > Can you please suggest how to test if there are significant differences in > the B coefficients of the Multiple Linear Regression across two > independent groups? > > Thank you in advance. > > Eins. ----- -- 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. -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Testing-significant-differences-in-Linear-Regression-B-coefficients-tp5723628p5723629.html Sent from the SPSSX Discussion mailing list archive at 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 |
In reply to this post by Bruce Weaver
At 10:45 AM 12/13/2013, E. Bernardo had asked:
>>Can you please suggest how to test if there are significant >>differences in the B coefficients of the Multiple Linear Regression >>across two independent groups? At 11:03 AM 12/13/2013, Bruce Weaver wrote: >Compute a product term >= Group indicator x the variable in question (I'll call it A). >Then run a model using the data for both groups, and include the >Group indicator variable and the Group x A product. The t-test for >the Group x A product (in your table of coefficients) tests the null >hypothesis that the effect of A is the same in both groups. That's exactly right; but if you do it, you should also include the group indicator variable in the model. Otherwise, a difference in means between the two groups may be mistaken for a difference in A-coefficients. ===================== 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 |
In reply to this post by E. Bernardo
Below is a little simulation showing how to test for a difference in coefficients between two independent groups by examining the variable added last test in the REGRESSION output and the final contrast in the MIXED output: Ryan -- *Generate Data. set seed 98765432. new file. input program. loop ID= 1 to 100. compute x = rv.normal(0,1).
compute group = rv.bernoulli(0.5). compute y = -1.5 + 0.9*x + 2.2*group + 0.5*x + 0.2*group*x + rv.normal(0,1). end case. end loop. end file. end input program.
execute. *Create Interaction Term. COMPUTE group_BY_x = group * x. EXECUTE. REGRESSION /STATISTICS COEFF OUTS R ANOVA /DEPENDENT y
/METHOD=ENTER group x group_BY_x. MIXED y BY group WITH x /FIXED=group group*x | NOINT SSTYPE(3) /METHOD=REML /PRINT=SOLUTION /TEST 'first group slope' group*x 1 0
/TEST 'second group slope' group*x 0 1 /TEST 'diff in group slopes' group*x -1 1. On Fri, Dec 13, 2013 at 10:45 AM, E. Bernardo <[hidden email]> wrote:
|
I was asked off-list about the parameterization of the MIXED code (exclusion of a grand intercept and main effect x). This is merely a reparameterization of the usual model (group, x , group-BY-x) in order to obtain the group-specific intercepts and group-specific slopes directly from the Fixed Effects table.
Now, this is really not necessary. One could obtain the group-specific slope tests and difference in group-specific slopes using TEST statements from the usual parameterization (group, x, group-BY-x) as follows:
MIXED y BY group WITH x /FIXED=group x group*x | SSTYPE(3) /METHOD=REML /PRINT=SOLUTION /TEST 'first group slope' x 1 group*x 1 0 /TEST 'second group slope' x 1 group*x 0 1 /TEST 'diff in group slopes' group*x 1 -1. How did I arrive at "x 1 group*x 1 0" for the first TEST statement? Here's how: /TEST 'y_hat @ x = 1' intercept 1 x 1 group 1 0 group*x 1 0
/TEST 'y_hat @ x = 0' intercept 1 x 0 group 1 0 group*x 0 0 Note that the two TEST statements above provide predicted values of the dependent variable y when values of covariate x are one unit apart ("1" and "0") for the first group.
Subtracting terms from the TEST statements above produces a TEST statement which will estimate the slope for the first group: /TEST 'first group slope' intercept 0 x 1 group 0 0 group*x 1 0
By eliminating effects which have all zero coefficients we obtain: /TEST 'first group slope' group*x 1 0 Success! :-) Truth be told there is nothing unique to MIXED modeling here. This same explanation could have been provided using the LMATRIX subcommand of the GLM procedure, for example.
Ryan On Sun, Dec 22, 2013 at 8:29 PM, Ryan Black <[hidden email]> wrote:
|
I made a small omission in the last TEST statement. It should obviously be: /TEST 'first group slope' x 1 group*x 1 0
Sorry, & happy holidays. Ryan On Sun, Dec 22, 2013 at 11:46 PM, Ryan Black <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |