r/Rsoftware • u/SnowQueen666 • Dec 07 '17
Could someone help me with this R problem? :( #needanxmasmiracle
I am totally lost on where to even start in this problem with R besides knowing the dimensions and installing it lol đ I honestly want to understand the logical steps I seem to be missing. Thanks in advance, nerds! I love you. Too soon?
A real estate economist collects information on 1000 house price sales from two similar neighborhoods - one called ââUniversity Townâ bordering a large state university, and one a neighborhood about three miles from the university - to examine the university effect on house prices. Data is contained in the file utown.csv. There are 1000 observations on the variables: PRICE = house price (in 1000 dollars) UTOWN = an indicator variable (1 for houses near the university; 0 otherwise) SQFT = house size (in 100 square feet) AGE = house age (in years) POOL = an indicator variable (1 if a pool is present; 0 otherwise) FPLACE = an indicator variable (1 if a fireplace is present; 0 otherwise) Note: The variables are expressed as lowercase in the dataset. (a) Estimate the following regression model: (1) pricei = β0 + β1utowni + β2sqf ti + β3utowni ¡ sqf ti + ui . Using the regression results (with robust standard errors), interpret the coefficients on the independent variables (not intercept), respectively. (b) Does the effect of utown on price depend on sqf t? Use either a two-tailed t-test or a 95% confidence interval for that. (Hint: which variable is relevant to the question.) (c) Does utown have a statistically significant effect on price? Use a heteroskedastic- robust F-test (because utown is shown twice in the regression equation). (d) Plot the relationship between sqrt and price. and add the estimated regression function relating price to utown for utown = 0 and for utown = 1.(Hint: Is your plot consistent with the findings in (b) and (c)?) e) What is the estimated effect of utown on price at the average value of sqf t? (Hint: if you take derivative the equation with respect to utown, you will see an equation for the effect.) (f) Construct a 95% confidence interval for the effect of utown on price when sqf t = 25.4 (median value). [Hint: In the case, main problem is to find standard error of the effect (i.e. standard error of Î˛Ë 1 + 25.4 à βË3). For this, you firstly need to transform the original regression model . And then you will obtain the standard error of Î˛Ë 1 + 25.4 à βË3 by re-estimating the transformed model]. (g) Estimate an alternative model: (2) ln(pricei) = β0 +β1utowni +β2sqf ti +β3sqf ti¡utowni + ui . How much is the location premium for houses near the university,i.e. the expected difference in house prices between the university town and others? Is it different from the result in (a)? How different?
Here is our data: https://docs.google.com/spreadsheets/d/1GetbmjNXpyQQj18X3C1cQaYNrf7V8DMqkWX56oclM6I/edit?usp=sharing











