Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A real estate developer wishes to study the relationship between the size of hom

ID: 3174498 • Letter: A

Question

A real estate developer wishes to study the relationship between the size of home a client will purchase (in square feet) and other variables. Possible independent variables include the family income, family size, whether there is a senior adult parent living with the family (1 for yes, 0 for no), and the total years of education beyond high school for the husband and wife. The sample information is reported below.


a.

Develop an appropriate multiple regression equation using stepwise method. (Use excel data analysis and enter number of family members first, then their income and delete any insignificant variables. Round P-value to 3 decimal places. Leave no cells blank - be certain to enter "0" wherever required. Round the Constant, Income values to 1 decimal place and T-value, R2, R2(adj) to 2 decimal places.)

A real estate developer wishes to study the relationship between the size of home a client will purchase (in square feet) and other variables. Possible independent variables include the family income, family size, whether there is a senior adult parent living with the family (1 for yes, 0 for no), and the total years of education beyond high school for the husband and wife. The sample information is reported below.

Explanation / Answer

We shall do this stepwise regression in open statistical package R , as shown in the snippet below

# read the data into R dataframe
data.df<- read.csv("C:\Users\586645\Downloads\Chegg\family.csv",header=TRUE)
str(data.df)

data.df<- data.df[,-1]
data.df$SquareFeet <- as.numeric(data.df$SquareFeet)

# Stepwise Regression
library(MASS)
fit <- lm(SquareFeet~.,data=data.df)
step <- stepAIC(fit, direction="both")
step$anova # display results

summary(step)

The results are

> summary(step)

Call:
lm(formula = SquareFeet ~ Income + Education, data = data.df)

Residuals:
Min 1Q Median 3Q Max
-1.9646 -1.3039 0.1836 0.9699 2.3728

Coefficients:
Estimate Std. Error t value Pr(>|t|)   
(Intercept) 0.19600 1.99432 0.098 0.92446   
Income 0.08912 0.02161 4.123 0.00444 **
Education -0.55451 0.20292 -2.733 0.02922 *

---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 1.773 on 7 degrees of freedom
Multiple R-squared: 0.7334,   Adjusted R-squared: 0.6572
F-statistic: 9.626 on 2 and 7 DF, p-value: 0.00979

The result the stepwise regression along with the relevant statisitcs are shown above.

The stepwise regression results are displayed below :

> step <- stepAIC(fit, direction="both")
Start: AIC=17.24
SquareFeet ~ Income + Family.Size + Senior.Parent + Education

Df Sum of Sq RSS AIC
- Senior.Parent 1 0.0134 20.642 15.247
- Family.Size 1 1.0967 21.725 15.759
<none> 20.628 17.241
- Income 1 6.0723 26.701 17.821
- Education 1 14.8265 35.455 20.657

Step: AIC=15.25
SquareFeet ~ Income + Family.Size + Education

Df Sum of Sq RSS AIC
- Family.Size 1 1.3568 21.998 13.884
<none> 20.642 15.247
- Income 1 6.1232 26.765 15.845
+ Senior.Parent 1 0.0134 20.628 17.241
- Education 1 14.8223 35.464 18.659

Step: AIC=13.88
SquareFeet ~ Income + Education

Df Sum of Sq RSS AIC
<none> 21.998 13.884
+ Family.Size 1 1.357 20.642 15.247
+ Senior.Parent 1 0.273 21.725 15.759
- Education 1 23.468 45.466 19.144
- Income 1 53.432 75.430 24.206
> step$anova # display results
Stepwise Model Path
Analysis of Deviance Table

Initial Model:
SquareFeet ~ Income + Family.Size + Senior.Parent + Education

Final Model:
SquareFeet ~ Income + Education


Step Df Deviance Resid. Df Resid. Dev AIC
1 5 20.62822 17.24075
2 - Senior.Parent 1 0.01335821 6 20.64158 15.24722
3 - Family.Size 1 1.35678718 7 21.99837 13.88383

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote