cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
vincem
Level II

Fitting Different Slopes Common Intercepts

Hi - i am unsure how to fit a regression model with different slopes BUT a common Interecpt. 

 

Assume Y=response, GROUP (2-levels),  TIme (Covariate)

 

Kind regards, Vince

12 REPLIES 12
dale_lehman
Level VII

Re: Fitting Different Slopes Common Intercepts

You can do this in Fit Y by X:  Y=response, X=time.  After the plot, Group by GROUP.  Then use Fit Special and constrain the intercept to 0.

Craige_Hales
Super User

Re: Fitting Different Slopes Common Intercepts

@dale_lehman Cool!

 

Male and Female groups have same interceptMale and Female groups have same intercept

Craige

Re: Fitting Different Slopes Common Intercepts

If you also want to estimate the common intercept, try this approach.

 

  1. Select Analyze > Fit Model.
  2. Click the red triangle at the top left and de-select Center Polynomials.
  3. Select the response column and click Y.
  4. Select the time and group columns and click Macros, then select Factorial to Degree.
  5. Select the group effect and click Remove.
  6. JMP will ask you to if it should remove all terms with this column. Click No.
  7. Click Run.
  8. JMP will warn you about a missing effect. Click Continue.

 

In general, we would keep the group effect in the model to maintain the model hierarchy. But that leads to a unique or different intercept for each group. This way you will get estimates and tests for the common intercept and unique group slopes.

Craige_Hales
Super User

Re: Fitting Different Slopes Common Intercepts

Thanks! I made up 40 because it looked good (better than zero, anyway). 

 

edit: adding an image. Left is fit y by x, center is fit model. Right is illustrating how to get the slopes from fit model.

@Mark_Bailey 

Getting the slopes from Fit ModelGetting the slopes from Fit Model

Craige
vincem
Level II

Re: Fitting Different Slopes Common Intercepts

Thanks...curious to knnow if there is an alternative way without this to stage process..
Craige_Hales
Super User

Re: Fitting Different Slopes Common Intercepts

Fit model does give the intercept and the two slopes in a single step. The picture is comparing the easy-to-read output in fit y by x with the parameters returned by fit model. I puzzled it out by comparing them; I hope @Mark_Bailey  is watching in case I've misinterpreted something.

Craige
vincem
Level II

Re: Fitting Different Slopes Common Intercepts

Thanks - how did you estimate the common intercept using fit y by x of 49?.
Craige_Hales
Super User

Re: Fitting Different Slopes Common Intercepts

I copied it from fit model to @dale_lehman answer, instead of the zero he suggested or the 40 I initially guessed. If you start with fit model rather than fit y by x, you get parameters for both lines without copying the numbers.

Craige
vincem
Level II

Re: Fitting Different Slopes Common Intercepts

Thanks - so I assume fit model implementation is required to get the common intercept and slopes first then fit by x to get the figure. Thanks for your help . Appreciate it