Discrete variables in a non linear regression model
Six Sigma – iSixSigma › Forums › Old Forums › General › Discrete variables in a non linear regression model
- This topic has 25 replies, 8 voices, and was last updated 12 years, 4 months ago by
Mikel.
-
AuthorPosts
-
February 14, 2010 at 1:30 am #53269
Hi,
I have a 4 discrete predictor variables and 2 continuous predictor variables in my model. One of them is a pricing type (fixed price1, fixed price2, time&Matl, value-based). I feel this variable has a strong influence on the response variable. I used to 1, 2, 3, 4 for these pricing types, but did not get good R square values;.
Waht is the best way for me to use this type of discrete variable in my regression model to get meaningful results. I am trying to answer two questions – 1) Is pricing structure a significant factor influencing the response variable and 2) which of the pricing types is more significant?
SN0February 14, 2010 at 12:39 pm #189373
Robert ButlerParticipant@rbutlerInclude @rbutler in your post and this person will
be notified via email.The problem is that you are treating your class variable “pricing type” as though it were an interval variable. Based on your post there is no rational reason to assign the values of 1,2,3, and 4 to the classes “fixed price1, fixed price2, time&Matl, and value-based” and you could have just as easily assigned these same class levels the numbers 100, pi, -5, and 0, or anything else that might strike your fancy.
If we assume you have done all of the things you needed to do before running the regression (confounding checks on the X matrix, plot the Y against the X’s to identify trends and thus suggest model terms, etc.) then the way you deal with this problem is construct dummy variables and run the regression on those instead.
In the case of pricing type the code would be something like the following:
Class Level Dum1 Dum2 Dum3
Fixed 1 0 0 0
Fixed 2 1 0 0
Ti & M 0 1 0
ValueB 0 0 1
For more information try pp. 241 of Draper and Smith Applied Regression Analysis 2nd Edition.0February 14, 2010 at 1:31 pm #189376
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.In the current version of Minitab, you can create these Indicator Variables (dummy variables as Robert calls them) and then add them to your equation. Be careful because there are some assumptions to the use of these variables…Robert can tell you what they are. Even better, Mini 16 will have these in a new format similar to a general factorial in which you can insert both continuous and discrete variables without the interim step of creating IVs.
0February 14, 2010 at 1:55 pm #189378I feel? What the heck does that mean?Robert’s advice is technically exquisite as usual and Darth is just
trying to brag that he has access to Minitab 16 (who cares? so do I
so it must not be anything special).Use your head and don’t just be a tool zombie. Try graphical
analysis before worrying about regression.What does a box plot of your 4 pricing types look like? You’ll know
the right answer when you look.0February 14, 2010 at 2:54 pm #189379Robert,
Thank you for the guidance on this. I will try as u suggested. Another question – I have couple of there categorical variables – type (C,O,CO), Maturity (Yes, No), Staffing risk (Yes,No). Is it ok to apply the same pricing type approach to these and add them to the model Xs?
SN0February 14, 2010 at 2:57 pm #189380Darth,
I have minitab 15 and I noticed that it has Calc -> Make indicator variables. How is this different from the Minitab 16 funtionality you mention?
SN0February 14, 2010 at 4:40 pm #189385
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.Wrong Stan. While a box plot might be interesting to see some visual difference, it is inadequate for drawing conclusions. He asked for influence on his Y. A box plot won’t do this. If he is looking for a significant difference, a box plot won’t do that, a hypothesis test will give him a p value. If he is looking for a prediction model, then regression will do that, not a box plot. The appropriate tool is a function of what he is trying to do and while a graphical approach is a good first step, it is dangerous to draw any definitive conclusions from eyeballing a picture, but you know that. Also, please provide the quote whereby you interpreted my response as a “brag”. Whoops, guess you can’t do that, can ya?
0February 14, 2010 at 4:42 pm #189386
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.It appears that you just insert the discrete column and it will automatically create the indicator variables along with the continuous columns. With Mini 15, you first create the IV as a separate function and then add those columns to your Model box. Not a big deal by any means.
0February 14, 2010 at 4:51 pm #189387Wrong again. The poster started with “I feel”. Just trying to give him
something better than that.BTW, I can tell you about statistical significance by looking at a box
plot if I know the sample size. You can’t?And yes your plug for 16 was meant to impress, who are you trying to
kid?0February 14, 2010 at 5:00 pm #189390
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.Stan,
Congratulations on your two new found abilities. From a box plot (without the added mean symbol) you can ascertain the nature of the distribution, the mean and s.d. and the associated p value. Great stuff. Or you can possibly estimate it. Secondly, congrats on your new found ability to read minds and intent via an anonymous Forum. I think I saw that movie with Tom Cruise (Minority Report)where a machine could predict who would commit crimes before they did it.0February 14, 2010 at 6:52 pm #189393Darth,Graphical analysis is way underrated. And yes, after seeing 10’s of
thousands of these things, I know when I am seeing a difference vs “I
feel”.What has happened to your sense of humor?Oh wait, never mind, I know.0February 14, 2010 at 11:52 pm #189396
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.I agree that graphical analysis should always be done before jumping on the tools. There are certainly cases where the only response is a BIG DUH!!!!!. In those cases you can use the analytical tools but they sure won’t be adding any clarity to what’s going on. In the case of your box plots, if you can’t see any overlap across the levels, they you can be pretty sure there is a difference and make the leap from “I feel” to “I know”.By the way, thanks for the discussion on Gage R&R, it has been useful, although out of character :-). Who says I lost my sense of humor?
0February 15, 2010 at 12:38 pm #189401
Robert ButlerParticipant@rbutlerInclude @rbutler in your post and this person will
be notified via email.For a categorical variable with three levels you will need to build two dummy variables. As for Maturity and Staffing – they are yes/no so they can be coded -1,1.
That takes care of the purely techical and you could, of course, just forge blindly ahead and run a regression and who knows what you will get. However, I’d recommend pausing and thinking about a few other things before proceeding.
In your first post you said ” I feel this variable has a strong influence on the response variable.” and I chose this to mean that you had actually plotted the data and seen a difference between pricing types. If, on the other hand, this is a literally statement and you haven’t looked at the data via plotting then you really need to take Stan’s advice and do this.
As for adding the terms to the model – this goes back to my statement concerning the independence of the X’s. You can just shove them into a regression package and, if they aren’t perfectly confounded with one another, the machine will spit out a regression model but it may be of very little value. Since you are using Minitab you can’t look at condition indicies but it is my understanding that you can look at VIF’s and I also understand that Minitab has the “jitter” option in plotting.
What you should do is look at jitterd plots of the X’s against one another to make sure that, at least as far as pairwise comparisons are concerned, they are reasonably independent of one another. You should then build a model with everything in it and look at the VIF’s. The VIF’s will at least tell you how any one variable is behaving relative to the others. If a term has a VIF that is unacceptable (usually a VIF of 10 or greater) you shouldn’t include it in your model building effort.0February 15, 2010 at 1:13 pm #189403
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.Robert,
What is the impact of unequal slopes across the levels?0February 15, 2010 at 2:30 pm #189406Don’t you hate it when the parents fight?
Stevo
Ps – Hope the make up sex is good.0February 15, 2010 at 4:52 pm #189410
Jonathon AndellParticipant@Jonathon-AndellInclude @Jonathon-Andell in your post and this person will
be notified via email.Darth, it seems like Stan and my 12-year-old son make use of a similar tactic. When he digs in on pushing people’s buttons, and I finally let him know he’s crossed the line, he suddenly tosses in a defensive, “I was just kidding.” He still thinks it’s a tactic superior to an apology and a backing off.Of course, he’s a few years away from adulthood. My son, that is.
0February 16, 2010 at 1:19 am #189424
Wheel Chair FriendlyMember@Wheel-Chair-FriendlyInclude @Wheel-Chair-Friendly in your post and this person will
be notified via email.How can I get access to MiniTab 16?
0February 16, 2010 at 1:26 am #189425
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.Friendly,That’s a great question. It is my understanding that Minitab has selected Stan to lead a team in an intensive evaluation of the upcoming release. I received a simplified copy that only does graphical output such as the often misunderstood Box Plot. I am sure he will respond to your question.
0February 16, 2010 at 3:53 pm #189440
Jonathon AndellParticipant@Jonathon-AndellInclude @Jonathon-Andell in your post and this person will
be notified via email.Stan’s inputs will be most useful if the fine folks at Minitab are afflicted with excessively positive self-images.
0February 16, 2010 at 5:01 pm #189444Hey Johnny,You really want to weigh in on this? I doubt you are up to the task.
0February 16, 2010 at 6:03 pm #189445
Mike CarnellParticipant@Mike-CarnellInclude @Mike-Carnell in your post and this person will
be notified via email.Darth,
Not sure what the agreement is now but it used to be when Minitab asked you to evaluate a future release they normally asked you not to discuss it in such a public format. Has that changed?
Regards0February 17, 2010 at 12:42 am #189447
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.Mike,
There were some significant changes that I was asked not to reveal or discuss at this time. I didn’t feel the small change to the IV function was a real game changer. Some of the others are pretty cool but you are correct, that this is not the place to discuss them.0February 17, 2010 at 1:03 am #189448
Jonathon AndellParticipant@Jonathon-AndellInclude @Jonathon-Andell in your post and this person will
be notified via email.Thanks for the invite Stanny.To which “this” are you referring?
0February 17, 2010 at 6:46 am #189454What BSThey didn’t ask you anything like that. They give it to you for
feedback not to puff up your ego and paltry self image. You thought it would impress. Instead you just violated another
trust. You’re on a roll.0February 18, 2010 at 12:23 am #189484
Ken FeldmanParticipant@DarthInclude @Darth in your post and this person will
be notified via email.Stan,
Your ongoing personal attacks are getting tiresome. I have given you leeway because of your personal situations but time to either up your dosage or take a break. You are becoming an embarrassment to yourself and others around you. If you really want to continue this I, unlike Johnny, will be more than glad to take on the challenge. I respect your knowledge and experience but you are turning into a real jerk although others may argue with the phrase, “turning into a real jerk”. Get the message from some of the other posts.0February 18, 2010 at 4:54 am #189485Darth,Just tell the truth. There are no attacks just pointing out the obvious.
0 -
AuthorPosts
The forum ‘General’ is closed to new topics and replies.