1
$\begingroup$

I have the following problem:

A data set, which is about the soft drink consumption of people, that covers 300 subjects are available to us. Using Excel tabulations and graphing capabilities only:

  • Come up with a research plan to econometrically assess the factors that are related to soft drink consumption. Your research plan:
  • Must give a step-by-step estimation strategy
  • Each step must be motivated by a preliminary tabular/graphical analysis

Then, using the Regression tool available through Data > Data Analysis, estimate and report your models.

  1. Gender (0: male, 1: female)
  2. Urban dummy (1: urban, 0: rural)
  3. Rural dummy (1: rural, 0: urban)
  4. Age
  5. Income (USD)
  6. Cons2: consumption of soft drinks per month -- the dependent variable

I thought about using the following model and then conducting coefficient testing for betas:

$$ \text{cons2} = \beta_0 + (\beta_1 \times \text{gender}) + (\beta_2 \times \text{urban}) + (\beta_3 \times \text{rural}) + (\beta_4 \times \text{age}) + (\beta_5 \times \text{income}) $$

However, due to multi-collinearity, the regression doesn't work in this model. What can be another model that would make sense to build in order to conduct these tests? Also, from using the simple linear regressions of each independent variable, what can we infer if we were to do so?

$\endgroup$
3
  • 1
    $\begingroup$ is having an urban and rural dummy necessary? $\endgroup$
    – seanv507
    May 9 at 6:11
  • 1
    $\begingroup$ I agree with @seanv507 that the redundant dummy variable doesn't make sense. Where are you seeing the multicollinearity? I would also recommend against using Excel for statistics, but I'm guessing this is for some assignment given the wording. $\endgroup$ May 9 at 11:06
  • 1
    $\begingroup$ This isn't just multicollinear: it's perfectly collinear by definition, because the US Census states "Rural encompasses all population, housing, and territory not included within an urban area." So: get rid of the redundant coding of urban vs. rural and try again. // Although the simple (univariate) regressions can be useful for exploratory analysis, to the extent you believe other variables might be important, you can't infer anything from their results: they are truly different models. $\endgroup$
    – whuber
    May 9 at 13:55

1 Answer 1

0
$\begingroup$

Multi-Collinearity Problem

A major problem you have here, and what I assume the collinearity problem arises from, is that you have two dummy variables that essentially are the same thing. Throwing them into a regression will result in one being a linear predictor of the other, which will produce nonsensical results. As a basic simulated example in R, here I create a continuous outcome, a continuous predictor, and two dummy coded predictors that are essentially copies of each other (coded essentially the way you have it):

#### Create Predictors ####
set.seed(123)
n <- 1000
x <- rnorm(n)
group <- rep(c(0,1),each=n/2)
group2 <- ifelse(group == 0, 1, 0)

#### Create Response ####
y <- ifelse(
  group == 0,
  .5*x + rnorm(n),
  2*x + rnorm(n)
)

#### Merge Into Data Frame ####
df <- data.frame(group,group2,x,y)
head(df)

The raw data looks like this, where you can see the coding for group2 is just the inverse coding of group1:

  group group2           x           y
1     0      1 -0.56047565 -1.27603655
2     0      1 -0.23017749 -1.15504379
3     0      1  1.55870831  0.76137392
4     0      1  0.07050839 -0.09692094
5     0      1  0.12928774 -2.48469891
6     0      1  1.71506499  1.89810595

Fitting the model to a regression:

#### Fit Model ####
fit <- lm(y ~ x + group + group2, data = df)
summary(fit)

Our summary shows a NA row for Group 2, which indicates that the two groups are a perfect linear combination of each other:

Call:
lm(formula = y ~ x + group + group2, data = df)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.3560 -0.7909 -0.0184  0.8579  3.8339 

Coefficients: (1 not defined because of singularities)
             Estimate Std. Error t value Pr(>|t|)    
(Intercept) -0.001413   0.054896  -0.026    0.979    
x            1.298312   0.039157  33.156   <2e-16 ***
group        0.023591   0.077625   0.304    0.761    
group2             NA         NA      NA       NA    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.227 on 997 degrees of freedom
Multiple R-squared:  0.5244,    Adjusted R-squared:  0.5235 
F-statistic: 549.7 on 2 and 997 DF,  p-value: < 2.2e-16

Multiple Fits

If one is attempting to test a hypothesis, particularly with respect to null hypothesis significance testing (NHST), one has to account for the probability of producing an erroneous result when fitting multiple models (aka family-wise error rate). Some apply corrections to account for this, but in your case it wouldn't be necessary or helpful. Just stick to fitting a single model, and removing the redundant predictor.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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