Subscribe Bookmark RSS Feed

using jmp to compare slopes and intercepts of multiple linear fits

kaoutaraboucher

Community Member

Joined:

Jan 10, 2015

Hi,

I need to compare the slopes and intercepts of 4 lines (linear regression y=ax+b) using jmp to see if any of them are similar or if they are significantly different from each other. Can anyone direct me towards a tutorial or a help document indicating the steps of how to do this. I am assuming I need to do an ancova test but have no clue how to setup the problem in jmp or if this is even the right test to do.

Any help will be highly appreciated.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi kaoutaraboucherif@gmail.com,

It sounds like a indicator-variable regression with an interaction is what you're looking for (an ANCOVA, by definition, does not have the interaction term allowing for independent slopes -- one of the most critical assumptions of an ANCOVA is homogeneity of regression). To set this up in JMP, you will need three columns: 1) a nominal column identifying the different groups; 2) a continuous column with the predictor; and 3) a continuous column with the response. I'll use Car Physical Data from the sample data directory for this example:

7904_Screen Shot 2015-01-11 at 12.40.48 PM.png

Suppose we want to know whether the relationship between Turning Circle and Displacement is the same for the cars made in different countries (USA, Japan, Other). Our model thus has three sources: a source for the effect of country (a test of the mean response by country), a source for the omnibus regression between turning circle and displacement (average relationship, ignoring country), and a source for the interaction (the degree to which each country's relationship of turning circle and displacement deviates from the grand regression).  We'll use Analyze > Fit Model to define this model.

7905_Screen Shot 2015-01-11 at 12.44.39 PM.png

  1. To set this up, I did the following:
  2. Enter Displacement into the Y role.
  3. Select BOTH Turning circle, and country in the column list
  4. Click the "Macro" button and select "Full Factorial" - Notice this creates the three sources we need
  5. Press Run

7906_Screen Shot 2015-01-11 at 12.45.01 PM.png

This yields the output above. Of most interest will probably the be the Parameter Estimates, and Effect Tests sections. If we look in the Effect Tests section under the interaction (Country*Turning Circle) we can see we have rejected the null hypothesis that the slopes are the same in each country -- e.g. we have evidence the regression of displacement on turning circle differs between the countries. Under the effect of Country we see we have not rejected the null hypothesis -- we do not have evidence that the MEAN displacement by country differs. If we really want a test of whether the intercepts of the models differ by country we need to uncheck "Center Polynomials" in the Fit Model specification under the Red Triangle. If we do that, we get the following output:

7907_Screen Shot 2015-01-11 at 12.54.21 PM.png

Notice that the source for the interaction is unchanged, as is the source for the omnibus regression, however the test of "Country" in this model is now a test for whether the mean response for country differs at 0 (i.e. the intercepts for each line), rather than a test for whether displacement differs by country at the mean of turning circle.

I hope this helps!

julian

1 REPLY
Solution

Hi kaoutaraboucherif@gmail.com,

It sounds like a indicator-variable regression with an interaction is what you're looking for (an ANCOVA, by definition, does not have the interaction term allowing for independent slopes -- one of the most critical assumptions of an ANCOVA is homogeneity of regression). To set this up in JMP, you will need three columns: 1) a nominal column identifying the different groups; 2) a continuous column with the predictor; and 3) a continuous column with the response. I'll use Car Physical Data from the sample data directory for this example:

7904_Screen Shot 2015-01-11 at 12.40.48 PM.png

Suppose we want to know whether the relationship between Turning Circle and Displacement is the same for the cars made in different countries (USA, Japan, Other). Our model thus has three sources: a source for the effect of country (a test of the mean response by country), a source for the omnibus regression between turning circle and displacement (average relationship, ignoring country), and a source for the interaction (the degree to which each country's relationship of turning circle and displacement deviates from the grand regression).  We'll use Analyze > Fit Model to define this model.

7905_Screen Shot 2015-01-11 at 12.44.39 PM.png

  1. To set this up, I did the following:
  2. Enter Displacement into the Y role.
  3. Select BOTH Turning circle, and country in the column list
  4. Click the "Macro" button and select "Full Factorial" - Notice this creates the three sources we need
  5. Press Run

7906_Screen Shot 2015-01-11 at 12.45.01 PM.png

This yields the output above. Of most interest will probably the be the Parameter Estimates, and Effect Tests sections. If we look in the Effect Tests section under the interaction (Country*Turning Circle) we can see we have rejected the null hypothesis that the slopes are the same in each country -- e.g. we have evidence the regression of displacement on turning circle differs between the countries. Under the effect of Country we see we have not rejected the null hypothesis -- we do not have evidence that the MEAN displacement by country differs. If we really want a test of whether the intercepts of the models differ by country we need to uncheck "Center Polynomials" in the Fit Model specification under the Red Triangle. If we do that, we get the following output:

7907_Screen Shot 2015-01-11 at 12.54.21 PM.png

Notice that the source for the interaction is unchanged, as is the source for the omnibus regression, however the test of "Country" in this model is now a test for whether the mean response for country differs at 0 (i.e. the intercepts for each line), rather than a test for whether displacement differs by country at the mean of turning circle.

I hope this helps!

julian