8.3 Examples of Categorical Variables¶
Baseline Model: Manjula Nayak's Household Survey¶
Regression Results:¶
Adding Ownership as a Categorical Variable¶
Adding Location as a Categorical Variable¶
Baseline Model¶
Initial Model:¶
- Dependent variable (y): Selling price (in lakhs).
- Independent variable (x1): Area (in square feet).
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:¶
Results:¶
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:
Results:¶
- Enhanced model fit and reduced residuals.
Significance Tests:¶
Residual Analysis¶
1. Standardized Residuals:¶
- No values exceeding ±3.
- Adding categorical variables improved the fit.
2. Plots of Residuals:¶
- Residuals vs. independent variables Random distribution, no patterns, indicating no bias.
- Residuals vs. predicted values Equally distributed above and below the x-axis.
Ask Hive Chat
Hive Chat
Hi, I'm Hive Chat, an AI assistant created by CollegeHive.
How can I help you today?
How can I help you today?