Dummy variables Changing Slope in MiniTab
Six Sigma – iSixSigma › Forums › Old Forums › General › Dummy variables Changing Slope in MiniTab
 This topic has 4 replies, 2 voices, and was last updated 11 years, 11 months ago by Lee.

AuthorPosts

October 5, 2009 at 9:27 pm #52733
I want to do a regression in a data set that is strongly suspected of having a differnt slope on one variable, depending on the cooling unit that is performing a cooling. My desire is to perform one stepwise regresssion to separate out the units (via dummy variable) and to reveal the estimated slope for each of the units. I’m having a problem with the modeling.
As a verification step I generated some simple data to see if MT would do what I wanted. I set Unit1 and Unit2 as dumy variables (i.e., as 0 and 1)
For Unit 2 I entered data a Temp=Time^2+1.0*Lb_loaded
For Unit 1 I entered data a Temp=Time^2+0.1*Lb_loaded
It returned Temp=1.0*Time^21.54*Unit_1+0.55*Lbs_Loaded +0.7714
Not at all what I expected. Am I doing something wrong, or can MT just not do what I wanted? I wanted to process the data as a group so that the cofficient on Time is the same for all units – as expeced from the fundamental processes going on.
0October 6, 2009 at 1:18 pm #185942
Robert ButlerParticipant@rbutler Include @rbutler in your post and this person will
be notified via email.I don’t see that you have a problem. You have a separate equation for each unit, you plugged in a series of times and loadings to simulate temp output and then you ran a regression to predict temperature as a function of time, load, and unit and you got the final regression equation as noted in your post.
Other than the fact that running the regression in raw units as opposed to normalized units (units scaled from 1 to 1) will give you regression diagnostics indicating you can’t include the square term in the model the equation is what you would expect. Temperature is temperature, Unit is either 0 or 1 therefore when it is 0 the unit term disappears and load is load. The coefficient on temperature applies to the entire data set.
Try the following
Raw Data
time load
2 2
4 2
8 2
2 6
4 6
8 6
Scale these numbers from 1 to 1 and form the squared term and the interaction and then run stepwise. If you set your sls to .05 the reduced model will be
Temp = 29 3.6*Unit +30*nTime +1.1*nLoad +9*nTime*nTime
where the “n” indicates the units have been normalized.
The equation has a single coefficient for time and load and time squared which applies to the entire data set. When Unit = 0 that part of the equation goes to 0 and when unit = 1 then 3.6 is subtracted from the intercept.
0October 6, 2009 at 4:43 pm #185947Tnaks for the reply. In the stepwise regression (or regular) MiniTab is not producing a warning about the squared time, but it is nice to know about how to sidestep that issue via normalization.
Now, is it ossible to have the coefficient of the Load to be different, .e., what I am getting is
0October 6, 2009 at 4:55 pm #185948Let me try again, sans fat fingers ;)
Thanks for the reply. In the stepwise regression (or regular) MiniTab is not producing a warning about the squared time, but it is nice to know about how to sidestep that issue via normalization.
Now, is it possible to have the coefficient of the Load to be different, i.e., what I am getting is
Temp= c0 +c1*Unit +c2*Time^2 +C3*Load
What I want is
Temp=c0+c1*Unit+c2*Time^2+c3*Load_in_Unit 1+c4*Load_in_Unit2
In other words, I want to see the differing slope for the Loads for the units rather than having them lumped together. I do want the coefficient for time to be the same though.
Thanks for the additional time.
Eugene0October 6, 2009 at 5:32 pm #185950Found the technique of what I wanted. Each unit has a different variable name for the load, and each unit for which the load is not applicable has the load set to zero. That forces the coefficient on Time to be the same in all units and each unit then comes up with a different coefficient on Load.
Thanks for the new perspective that started breaking up my mindset.0 
AuthorPosts
The forum ‘General’ is closed to new topics and replies.