# Exercise # plot the graph with fitted line gnuplot price sqft --output=display # runs regression of sqft on prices ols price const sqft # saves the predicted values series yhat1=$yhat # saves the residuals genr resid1=price-yhat1 # generates the squared variable sqft genr sqft2=sqft^2 gnuplot sqft resid1 --output=display # OLS of sqft squared on prices ols price const sqft2 series yhat2=$yhat genr resid2=price-yhat2 gnuplot sqft resid2 --output=display # calculating the impact of increasing the size of apartment on prices scalar slope_2000=2*$coeff(sqft2)*2000