Skip to content

8.3 Examples of Categorical Variables

Baseline Model: Manjula Nayak's Household Survey

  • image

Regression Results:

  • image

Adding Ownership as a Categorical Variable

image


Adding Location as a Categorical Variable

image image


Baseline Model

Initial Model:

  • Dependent variable (y): Selling price (in lakhs).
  • Independent variable (x1): Area (in square feet).
  • image

Limitations:

  • Adding quantitative variables (e.g., bedrooms, bathrooms) led to multicollinearity issues, as these variables were highly correlated with area.

Step 1: Adding a Categorical Variable (Premium Location)

New Model:

  • Dependent variable (y): Selling price.
  • Independent variables:
  • x1: Area (quantitative).
  • x2: Premium location (categorical; x2 = 1 for premium, x2 = 0 otherwise).

Regression Equation:

image

Results:

image


Step 2: Adding Multiple Categorical Variables

Additional Variables:

  • x3: Amenities (1 if present, 0 otherwise).
  • x4: Gated community (1 if gated, 0 otherwise).

New Model:

  • Regression equation: image

Results:

  • Enhanced model fit and reduced residuals. image

Significance Tests:

image


Residual Analysis

1. Standardized Residuals:

  • No values exceeding ±3.
  • Adding categorical variables improved the fit.

2. Plots of Residuals:

  • Residuals vs. independent variables image Random distribution, no patterns, indicating no bias.
  • Residuals vs. predicted values image Equally distributed above and below the x-axis.

Ask Hive Chat Chat Icon
Hive Chat
Hi, I'm Hive Chat, an AI assistant created by CollegeHive.
How can I help you today?