Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

QBUS28l0:  STAT1sT1cAL MopELL1Nc FoR BUs1NEss

SEMEsTER 2, 202l

Week 5 Tutorial

The purpose of this tutorial is to give you some practice on the concepts and appli- cation of multiple linear regression and on ordinary least squares estimation: assessing relationships between several numerical variables.

Task 1

The dataset ”real-estate.csv” contains information on the sale of properties in a Cana- dian city.  Variables include sale ”Price”, size of property ”Sqft”, number of ”Bed- room”s, etc. Real estate economists and agents wish to understand how these factors work together to influence, or relate to, the sale price of a property. That is our goal in this tutorial. The full details of the variables in the data file follow:

❼ Price: sale price of a house.

❼ Sqft : the size of the dwelling in square feet.

❼ Bedroom: number of bedrooms.

❼ Bathroom: number of full bathrooms.

❼ Airconditioning : Does it have aircon? Yes (1) or no (0)

❼ Garage: How many cars can the garage(s) hold?

❼ Pool : Does it have a pool? Yes (1) or no (0)

❼ YearBuild : The year the house was built

❼ Quality : 1, 2 or 3 (not sure on actual definition)

❼ Lot : the size of the land in square feet

❼ AdjHighway : Is it next to a highway? Yes (1) No (0)

(a) Use the ”Tut5 code.py” code to form a new variable called ”Age”, and to form a correlation heat-map and a scatterplot matrix of the numerical variables in the data. Discuss the potential relationships in the dataset, with main focus on the relationships with Price.

(b) Fit an MLR model to the sale price data using all the numerical variables in the data set.  Interpret and comment on the estimated relationships and model parameters.

(c) Find the variance inflation factors in this estimated ”full” model. Discuss them. Is variance inflation an issue in this model?

(d) Perform the F-test that at least one of the numerical predictors is linearly related to Price.

(e)  Choose two numerical variables that you think, logically, would most affect Price. Fit the MLR with only those two variables; interpret the estimated model.

(f)  Compare the strength of fit of the ”reduced” model in part (e), with the ”full” model in part (b). Also find the VIFs in the reduced model and assess if this is an issue here.

(g) Assess the goodness of fit of your reduced MLR model in part (e). Are the MLR LSA satisfied?

(h) Pick one of the other numeric variables in the dataset, one not included in your reduced MLR, and one that you believe is causing some OVB in your MLR. Argue/discuss why this omitted variable would be causing OVB and to which of the variables in your MLR.

(i) Add this 3rd variable you think is causing OVB to your reduced MLR (from part (h)), and refit it by OLS. Assess the level of OVB the added variable was causing.

 

Task 2

(There will not likely be enough time in tutorial to consider this question in detail. So, you may instead treat it as an extra exam practice question)

Consider the MLR model where p = 2:

Yi  = β0 + β1Xi,1 + β2Xi,2 + εi

and a sample of data (y1 , X1,1 , X1,2 ), (y2 , X2,1 , , X2,2 ), . . . , (yn , Xn,1, Xn,2).

Show that, when estimating this model by OLS, the usual decomposition of the sums of squares, being TSS = RegSS + RSS , still holds for this model.