1
$\begingroup$

I am looking at a dataset that looks like this. Let's call it movies:

enter image description here

As you can see, the genre column has several values. So does the studio column. I am trying to determine what the multiple linear regression model is using R using these two variables and the avg_score column. How do I do this? I tried

enter image description here

But that spits out this data:

enter image description here

But that doesn't seem right? First off... if the movie is made from Studio A, that means it can't be made from Studio B. Also, if a movie is a horror movie, it's not a documentary. How do I capture that relationship using MLR and R? The output I generated seems wrong no?

For example, let's look at studio7th art. Is the way to interpret that row that it has a coefficient of 15.68 (If the studio is made by them, the avg_score on avg goes up 15.68), with a p-value of 0.44 (not significant), with a SE of 20? That data seems... worthless. Is there a way to do this that isn't idiotic?

| cite | improve this question | | | | |
$\endgroup$
3
$\begingroup$

"if the movie is made from Studio A, that means it can't be made from Studio B." - That is implicit in how the variables were created. What internally happens is that R is creating dummy variables from your catgorical variable.

In any given record, only 1 of the dummy variables will have a value of 1, while all else will be 0.

"For example, let's look at studio7th art." - If the co-efficient in a regression shows a high p-value it could mean multiple different things. In your case, the biggest problem is that you have a large number of levels for studio and probably not enough observations in your dataset to characterize every level.

So rather than build a model with all studios, you could build dummy variables yourself. Something along the lines of "Studio-Category1" which includes some of the larger houses. "Studio-Category2" with smaller studios etc, which you would know from domain experience.

Subsequently build your model with these variables as inputs instead of the entire studio categories.

| cite | improve this answer | | | | |
$\endgroup$
  • 1
    $\begingroup$ +1 Moreover it seems that the dataset has not been cleaned at all since you can see 20th Century Fox Corporat and 20th Century Fox Corporation (or Anchor Bay Films Anchor Bay Entertainment), I would assume those are the same studio but here since the name are slightly different R consider them two different studios (and the headcount for those studios is even lower than it should be) $\endgroup$ – Riff May 4 '17 at 7:15
  • $\begingroup$ So I guess R knows how to turn a single column into several dummy variables if it notices that the column is categorical and the values are mutually exclusive? What does it use as a reference/starting value of variable? $\endgroup$ – Jwan622 May 4 '17 at 21:39
  • $\begingroup$ You should read up on dummy variables, it should clear up your doubts. $\endgroup$ – Arun Jose May 5 '17 at 1:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.