week09-1

week09-1 - TA session 9 Econ. 103, winter 2010 Wed., Mar....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: TA session 9 Econ. 103, winter 2010 Wed., Mar. 3, 2010, 10:00 a.m. and 1:00 p.m. in PP2400E. Problem 2 First lets summarize the data and get an idea of what were looking at. sum Variable | Obs Mean Std. Dev. Min Max-------------+-------------------------------------------------------- gradecat | 657 2.245053 .9575967 1 5 female | 657 .5022831 .5003757 1 ageyrs | 657 16.15221 1.215236 14 18 white | 648 .5185185 .5000429 1 black | 648 .183642 .387491 1-------------+-------------------------------------------------------- hispanic | 648 .2268519 .4191195 1 other | 648 .0709877 .2570026 1 beltpct | 653 76.90658 23.67181 20 100 drivedrunk | 642 .1308411 .3374895 1 ridedrunk | 655 .3343511 .4721237 1 Most of these variables are dummy variables. The only ones that arent are gradecat and beltpct . Use the browse gradecat beltpct command to take a look at these exceptions. Even though they are not dummy variables, gradecat and beltpct are also discrete-valued variables. 2.1 Generate dummy variables for gradecat The question asks you to generate dummy variables, specifically for the students who get Fs. One easy way to do this is just to write . gen getsFs=1 if gradecat == 5 . replace getsFs=0 if gradecat !=5 and this will do it. A fun and powerful command if you need to generate an entire set of dummy variables is . tabulate gradecat, gen(grade) which generates a set of dummy variables grade1 , grade2 , grade3 , grade4 , and grade5 , each corresponding to one of the categories in gradecat . For the purposes of this answer key Im going to assume we used both the above commands and have a dummy called getsFs as well as a set of dummies grade1 through grade5 . 1 2.2 Estimate the model: seat belt wearing= f(grades, race, sex, whether you have driven drunk, and whether you have rode with a drunk) Regression 1 . reg beltpct grade2 grade3 grade4 grade5 ageyrs white black hispanic female dri > vedrunk ridedrunk Source | SS df MS Number of obs = 629-------------+------------------------------ F( 11, 617) = 7.03 Model | 39138.0031 11 3558.00028 Prob > F = 0.0000 Residual | 312224.795 617 506.036945 R-squared = 0.1114-------------+------------------------------ Adj R-squared = 0.0955 Total | 351362.798 628 559.494901 Root MSE = 22.495------------------------------------------------------------------------------ beltpct | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+----------------------------------------------------------------...
View Full Document

Page1 / 5

week09-1 - TA session 9 Econ. 103, winter 2010 Wed., Mar....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online