10.07.2015 Views

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

Using R for Introductory Statistics : John Verzani

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Linear regression 291+ tot=a+ <strong>for</strong>(in 1:length(coefs)) tot=tot+coefs[i]*x^{i-1}+ tot+}> plot(h.d ~ init.h)> curve(polynomial(x,coef(res.1m)), add=TRUE, lty=1)> curve(polynomial(x,coef(res.lm2)), add=TRUE, lty=2)> curve(polynomial(x,coef(res.lm3)), add=TRUE, lty=3)>legend(1200,400,legend=c("linear","quadratic","cubic"),lty=l:3)10.3.3 Interpreting the regression parametersIn many cases, interpretation in simple regression is straight<strong>for</strong>ward. Changes in thepredictor variable correspond to changes in the response variable in a linear manner: aunit change in the predictor corresponds to a change in the response.However, in multiple regression this picture may not be applicable, as we may not beable to change just a single variable. As well, when more variables are added to a model,if the variables are correlated then the sign of the coefficients can change, leading to adifferent interpretation.The language often used is that we "control" the other variables while seeking aprimary predictor variable.■ Example 10.7: Does taller mean higher paid? A University of Florida pressrelease from October 16, 2003, reads:“Height matters <strong>for</strong> career success,” said Timothy Judge, a UFmanagement professor….Judge’s study, which controlled <strong>for</strong> gender, weight, and age, found thatmere inches cost thousands of dollars. Each inch in height amounted toabout $789 more a year in pay, the study found.The mathematical model mentioned would bepay = β 0 + β 1 height + β 2 gender + β 3 weight + β 4 age + ε.(In the next chapter we see how to interpret the term involving the categorical variablegender.) The data gives rise to the estimate The authors interpret this to meanthat each extra inch of height corresponds to a $789 increase in expected pay. Sosomeone who is 4 inches taller, say 6 feet versus 5 feet 8 inches, would be expected toearn $3,156 more annually. is used to predict expected values.) The word “controlled”means that we included these variables in the model.Unlike in a science experiment, where we may be able to specify the value of avariable, a person cannot simply grow an inch to see if his salary goes up. This is anobservational study, so causal interpretations are not necessarily valid.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!