ECONOMICS 351* -- Stata 10 Tutorial 6. Stata 10 Tutorial 6

Size: px
Start display at page:

Download "ECONOMICS 351* -- Stata 10 Tutorial 6. Stata 10 Tutorial 6"

Transcription

1 ECONOMICS 35* -- Stata Tutoral 6 Stata Tutoral 6 TOPICS: Functonal Form and Varable Re-scalng n Smple Lnear Regresson Models, and An Introducton to Multple Lnear Regresson Models DATA: auto.dta (a Stata-format data fle) TASKS: Stata Tutoral 6 has three prmary purposes: () to ntroduce you to some of the alternatve functonal forms commonly used n lnear-n-coeffcents regresson models; (2) to nvestgate how varable re-scalng that s, changng the unts of measurement for Y and/or X affects OLS estmates of the slope coeffcent β and the ntercept coeffcent β n a smple lnear regresson equaton; and (3) to ntroduce you to OLS estmaton of multple lnear regresson models wth two or more regressors, n partcular, to demonstrate how the slope coeffcent estmates n a multple lnear regresson model are nterpreted. The Stata commands that consttute the prmary subject of ths tutoral are: regress Used to perform OLS estmaton of smple and multple lnear regresson models. predct Computes estmated Y -values and OLS resduals. graph twoway Draws scatterplots of sample data ponts and lne graphs of OLS sample regresson functons. lncom Used after estmaton to compute lnear combnatons of coeffcent estmates and assocated statstcs. NOTE: Stata commands are case senstve. All Stata command names must be typed n the Command wndow n lower case letters. LEARNING FROM THIS TUTORIAL: Stata Tutoral 6 contans some mportant analytcal results. You should make sure you understand them. ECON 35* -- Fall 28: Stata Tutoral 6 Page of 2 pages

2 ECONOMICS 35* -- Stata Tutoral 6 Preparng for Your Stata Sesson Before begnnng your Stata sesson, use Wndows Explorer to copy the Stataformat dataset auto.dta to the Stata workng drectory on the C:-drve or D:-drve of the computer at whch you are workng. On the computers n Dunnng 35, the default Stata workng drectory s usually C:\data. On the computers n MC B, the default Stata workng drectory s usually D:\courses. Start Your Stata Sesson To start your Stata sesson, double-clck on the Stata con n the Wndows desktop. After you double-clck the Stata con, you wll see the now famlar screen of four Stata wndows. Record Your Stata Sesson log usng To record your Stata sesson, ncludng all the Stata commands you enter and the results (output) produced by these commands, make a.log fle named 35tutoral6.log. To open (begn) the.log fle 35tutoral6.log, enter n the Command wndow: log usng 35tutoral6.log Ths command opens a fle called 35tutoral6.log n the current Stata workng drectory. Remember that once you have opened the 35tutoral6.log fle, a copy of all the commands you enter durng your Stata sesson and of all the results they produce s recorded n that 35tutoral6.log fle. An alternatve way to open the.log fle 35tutoral6.log s to clck on the Log button; clck on Save as type: and select Log (*.log); clck on the Fle name: box and type the fle name 35tutoral6; and clck on the Save button. ECON 35* -- Fall 28: Stata Tutoral 6 Page 2 of 2 pages

3 ECONOMICS 35* -- Stata Tutoral 6 Loadng a Stata-Format Dataset nto Stata use Load, or read, nto memory the dataset you are usng. To load the Stata-format data fle auto.dta nto memory, enter n the Command wndow: use auto Ths command loads nto memory the Stata-format dataset auto.dta. Famlarze Yourself wth the Current Dataset To famlarze (or re-famlarze) yourself wth the contents of the current dataset, type n the Command wndow the followng commands: descrbe summarze Alternatve Functonal Forms for the Smple Lnear Regresson Model Ths secton demonstrates () how to estmate by OLS dfferent functonal forms for the smple lnear regresson model relatng car prce (prce ) to car weght (weght ), (2) how to use the predct command to compute estmated or predcted values of the regressand ( $Y -values) for the sample observatons, and (3) how to use the graph twoway command to dsplay the OLS sample regresson functon correspondng to the observed sample values of the regressor weght.. The LIN-LIN (Lnear) Model: Ths model take the general form Y β + β X + u (a) Settng Y prce and X weght, PRE (a) takes the specfc form prce β + β weght + u (b) To estmate ths model (agan!) by OLS for the full sample of observatons n dataset auto.dta, and to calculate the estmated (or predcted) values of prce ECON 35* -- Fall 28: Stata Tutoral 6 Page 3 of 2 pages

4 ECONOMICS 35* -- Stata Tutoral 6 for the sample observatons, enter n the Command wndow the followng commands: regress prce weght predct yhat The yhat varable created by the predct command takes the form Ŷ prîce βˆ + βˆ X βˆ + βˆ weght (,..., N) (c) where ˆβ and are the OLS coeffcent estmates for the LIN-LIN model. $ β To make a scatterplot of the sample data ( Y, X ) (prce, weght ) and a lne graph of the OLS sample regresson functon (c), frst sort the sample data by weght and then use the followng graph twoway command: sort weght graph twoway scatter prce weght lne yhat weght, yttle("car prce (U.S. dollars)," "observed and estmated") xttle("car weght (pounds)") ttle("lin-lin Model of Car Prce on Car Weght") subttle("ols Regresson Lne and Scatterplot of Sample Data") legend(label( "Sample data ponts") label(2 "Sample regresson lne")) Ths command nstructs Stata to draw on the same set of coordnate axes both () a scatterplot of the sample data ponts (Y, X ) (prce, weght ) and (2) a lne graph of the estmated values of prce (.e., yhat Ŷ prîce ) aganst the sample values of weght,.e, of the ponts ( Y $, X). Note that weght s the varable measured on the horzontal X-axs, and both prce and yhat are measured on the vertcal Y-axs. 2. The LOG-LOG (Double-Log) Model: Ths model takes the general form ln Y α + α ln X + u (2a) where lny s the natural logarthm of Y and lnx s the natural logarthm of X. ECON 35* -- Fall 28: Stata Tutoral 6 Page 4 of 2 pages

5 ECONOMICS 35* -- Stata Tutoral 6 Settng ln Y ln( prce) and lnx ln( weght ), PRE (2a) takes the specfc form ln( prce ) α + α ln(weght ) + u, (2b) where ln( prce ) the natural logarthm of the varable prce ; ln( weght ) the natural logarthm of the varable weght. Note: The natural logarthm s defned only for varables that take only postve values. Ths s the case for both prce and weght n the dataset auto.dta. Before estmatng the LOG-LOG model (2), you must generate the natural logarthms of the varables prce and weght. Use the followng Stata generate commands to do ths. generate lnprce ln(prce) generate lnweght ln(weght) summarze lnprce lnweght To estmate the LOG-LOG model by OLS for the full sample of observatons and to calculate the estmated (or predcted) values of ln(prce ) for the sample observatons, enter n the Command wndow: regress lnprce lnweght predct lnyhatdl The lnyhatdl varable created by the predct command takes the form lnˆ Y ln(prîce ) αˆ + αˆ ln X αˆ + αˆ ln(weght ) (,..., N) (2c) where ˆα and $α are the OLS coeffcent estmates for the LOG-LOG model and l$ny n( $ l prce) denotes the predcted values of lny. ECON 35* -- Fall 28: Stata Tutoral 6 Page 5 of 2 pages

6 ECONOMICS 35* -- Stata Tutoral 6 To make a scatterplot of the sample data (lny, lnx ) and a lne graph of the OLS sample regresson functon (2c), use the followng graph twoway command: graph twoway scatter lnprce lnweght lne lnyhatdl lnweght, yttle("ln(prce)," "observed and estmated") xttle("ln(weght)") ttle("log-log Model of Car Prce on Car Weght") subttle("ols Regresson Lne and Scatterplot of Sample Data") legend(label( "Sample data ponts") label(2 "Sample regresson lne")) 3. The LOG-LIN (Sem-Log) Model: Ths model takes the general form ln Y γ + γ X + u (3a) Settng l n Y ln( prce ) and X weght, PRE (3a) takes the specfc form ln( prce ) γ + γ weght + u (3b) To estmate the LOG-LIN model by OLS for the full sample of observatons and to calculate the estmated (or predcted) values of ln(prce ) for the sample observatons, type n the Command wndow: regress lnprce weght predct lnyhatsl The lnyhatsl varable created by the predct command takes the form lnˆ Y ln(prîce ) γˆ + γˆ X γˆ + γˆ weght (,..., N) (3c) where ˆγ and $γ are the OLS coeffcent estmates for the LOG-LIN model and l$ ny n( rc $ l p e) denotes the predcted values of lny. ECON 35* -- Fall 28: Stata Tutoral 6 Page 6 of 2 pages

7 ECONOMICS 35* -- Stata Tutoral 6 To make a scatterplot of the sample data (lny, X ) and a graph of the OLS sample regresson functon (3c), use the followng graph twoway command: graph twoway scatter lnprce weght lne lnyhatsl weght, yttle("ln(car prce)," "observed and estmated") xttle("car weght (pounds)") ttle("log-lin Model of Car Prce on Car Weght") subttle("ols Regresson and Scatterplot of Sample Data") legend(label( "Sample data ponts") label(2 "Sample regresson lne")) Unts of Measurement and Re-scalng of Varables n Smple Regresson Models The coeffcent estmates n lnear (LIN-LIN) regresson models depend on the unts of measurement for the dependent varable Y and the ndependent varable X. Ths secton presents some analytcal results on how changng unts of measurement for Y and/or X affects the OLS estmates of the slope coeffcent β and the ntercept coeffcent β n a smple lnear regresson equaton. It then llustrates these results wth a smple lnear regresson model. Analyss: (There are no Stata commands n ths secton.) The term "re-scalng a varable" means multplyng that varable by a constant; ths s what happens when we change the unts n whch a varable s measured. Wrte the orgnal regresson equaton, expressed n terms of the orgnal varables Y and X, as equaton (4): Y β + β X + u. (4) Re-scale the orgnal varables Y and X by multplyng each by some arbtrarlyselected constant. Create the re-scaled varable X& by multplyng X by the constant c: X & cx (,, N), where c s a specfed constant. ECON 35* -- Fall 28: Stata Tutoral 6 Page 7 of 2 pages

8 ECONOMICS 35* -- Stata Tutoral 6 Smlarly, create the re-scaled varable Y& by multplyng Y by the constant d: Y & dy (,, N), where d s a specfed constant. The new regresson equaton wrtten n terms of the re-scaled varables can be wrtten as: X& and Y& Y & X& + u&. (5) β + β Questons: How s the OLS estmate of the slope coeffcent OLS estmate of β n equaton (4)? How s the OLS estmate of the ntercept coeffcent the OLS estmate of β n equaton (4)? Answers: β n equaton (5) related to the β n equaton (5) related to The formula for the OLS estmator of β n the orgnal equaton (4) s: β ˆ xy 2 x where x X X and y Y Y (,, N). The formula for the OLS estmator of β n the orgnal equaton (4) s: β ˆ Y ˆ X where Y Y N and X X N. β The formula for the OLS estmator of β n the re-scaled equaton (5) s: β ˆ x& y& 2 x& where x& X& X& and y& Y& Y& (,, N). (6) To see how the new slope coeffcent estmator βˆ s related to the orgnal slope coeffcent estmator ˆβ, we need to determne how the re-scaled devatons-from- ECON 35* -- Fall 28: Stata Tutoral 6 Page 8 of 2 pages

9 ECONOMICS 35* -- Stata Tutoral 6 means varables x& X& X& and y& Y& Y& are related to the orgnal devatons-from-means varables x X X and y Y Y. Here s the algebra: X & cx X & cx x & X& X& cx cx c(x X) cx ; Y & dy Y & dy y & Y& Y& dy dy d(y Y) dy. Thus, we see that x & cx and mply the followng results: y & dy (,, N). These two equaltes n turn x & y& cx dy cdx y x & y& cd x y ; x & (cx ) c x x& c x. Now substtute these results nto expresson (6) for βˆ : βˆ x& y& x& 2 cd c 2 x y x 2 d c x y x 2 d βˆ. c The formula for the OLS estmator of β n the re-scaled equaton (5) s: β ˆ Y& ˆ X&. (7) β To see how the new ntercept coeffcent estmator βˆ s related to the orgnal ntercept coeffcent estmator ˆβ, substtute nto expresson (7) for βˆ the d prevous results showng that ˆβ ˆ β, Y & dy and X & cx : c β ˆ Y& βˆ X& dy d βˆ c cx dy dˆ β X d(y βˆ X) dˆ β. ECON 35* -- Fall 28: Stata Tutoral 6 Page 9 of 2 pages

10 ECONOMICS 35* -- Stata Tutoral 6 Results: d β ˆ ˆ β βˆ s affected by the re-scalng of both Y and X. (8) c β ˆ dˆ β ˆ s affected only by the re-scalng of Y. (9) β Some Examples To llustrate the effects of varable re-scalng.e., of changng the unts of measurement for Y and/or X we nvestgate how changng the unts of measurement for the varables n regresson equaton () affect the OLS coeffcent estmates. For convenence, the orgnal equaton () s rewrtten here as: prce β + β weght + u () where prce car prce measured n US dollars and weght car weght measured n pounds. Frst, re-estmate by OLS the LIN-LIN model gven by regresson equaton () and save as scalars the OLS coeffcent estmates βˆ and βˆ. Enter the commands: regress prce weght scalar beq _b[_cons] scalar beq _b[weght] scalar lst beq beq. Re-scale only the dependent varable. Re-scale the dependent varable prce so that t s measured n hundreds of US dollars nstead of US dollars. Generate the re-scaled prce varable newp car prce measured n hundreds of US dollars, where newp prce /. Enter the command: generate newp prce/ ECON 35* -- Fall 28: Stata Tutoral 6 Page of 2 pages

11 ECONOMICS 35* -- Stata Tutoral 6 Compare the sample values of the orgnal prce varable wth those of the rescaled prce varable newp. Enter the commands: summarze prce newp regress newp prce Estmate by OLS the regresson equaton wth newp as dependent varable and weght as the ndependent varable. Use scalar and dsplay commands to save the resultng OLS coeffcent estmates and compare them wth the coeffcent estmates for the baselne model gven by PRE (). Enter the commands: regress newp weght scalar beq2 _b[_cons] scalar beq2 _b[weght] scalar lst beq beq2 beq beq2 dsplay beq2/beq dsplay beq2/beq Carefully compare the results of ths command wth those from OLS estmaton of the orgnal regresson equaton (). Whch results have changed as a result of re-scalng only the dependent varable? 2. Re-scale only the ndependent varable. Re-scale the ndependent varable weght so that t s measured n klograms nstead of pounds, where klogram 2.2 pounds. Generate the re-scaled weght varable neww car weght measured n klograms, where neww weght /2.2. Enter the command: generate neww weght/2.2 Compare the sample values of the orgnal weght varable wth those of the rescaled weght varable neww. Enter the commands: summarze weght neww regress neww weght regress weght neww ECON 35* -- Fall 28: Stata Tutoral 6 Page of 2 pages

12 ECONOMICS 35* -- Stata Tutoral 6 Estmate by OLS the regresson equaton wth prce as dependent varable and neww as the ndependent varable. Use scalar and dsplay commands to save the resultng OLS coeffcent estmates and compare them wth the coeffcent estmates for the baselne model gven by PRE (). Enter the commands: regress prce neww scalar beq3 _b[_cons] scalar beq3 _b[neww] scalar lst beq beq3 beq beq3 dsplay beq3/beq dsplay beq3/beq Carefully compare the results of ths command wth those from OLS estmaton of the orgnal regresson equaton (). Whch results have changed as a result of re-scalng only the ndependent varable? 3. Re-scale both the dependent varable and the ndependent varable. Re-scale both the dependent varable prce and the ndependent varable weght as above. The re-scaled dependent varable s newp car prce measured n hundreds of US dollars, where newp prce /. The re-scaled ndependent varable s neww car weght measured n klograms, where neww weght /2.2. Estmate by OLS the regresson equaton wth newp as dependent varable and neww as the ndependent varable. Use scalar and dsplay commands to save the resultng OLS coeffcent estmates and compare them wth the coeffcent estmates for the baselne model gven by PRE (). Enter the commands: regress newp neww scalar beq4 _b[_cons] scalar beq4 _b[neww] scalar lst beq beq4 beq beq4 dsplay beq4/beq dsplay beq4/beq Carefully compare the results of ths command wth those from OLS estmaton of the orgnal regresson equaton (). Whch results have changed as a result of re-scalng both the dependent and ndependent varables? ECON 35* -- Fall 28: Stata Tutoral 6 Page 2 of 2 pages

13 ECONOMICS 35* -- Stata Tutoral 6 Interpretng Slope Coeffcents n Multple Lnear Regresson Models In ths secton, we ntroduce you to the use of the Stata regress command to compute OLS estmates of multple lnear regresson equatons that contan two or more regressors. The mechancs of usng the regress command for estmatng multple lnear regresson models are a straghtforward extenson of those for estmatng smple lnear regresson models. Ths secton therefore focuses more on how the nterpretaton of slope coeffcent estmates n multple lnear regresson models dffers from the nterpretaton of slope coeffcent estmates n smple lnear regresson models. Consder two dfferent lnear regresson models for car prce, prce. Model s the smple lnear regresson model gven by populaton regresson equaton (.) and the correspondng populaton regresson functon (.2): prce β + β weght + u (.) E ( prce weght ) β + βweght (.2) Model 2 s the multple lnear regresson model gven by populaton regresson equaton (.) and the correspondng populaton regresson functon (.2): prce β + β weght + β mpg + u (.) E ( prce weght, mpg ) β + βweght + β2mpg 2 (.2) Queston: How does the slope coeffcent β n the smple lnear regresson model gven by equatons (.) and (.2) dffer from the slope coeffcent β n the multple lnear regresson model 2 gven by equatons (.) and.2)? Analytcal Answer The slope coeffcent β n the smple lnear regresson model gven by equatons (.) and (.2) s the unadjusted or total margnal effect of car weght on mean car prce, because PRE (.) and PRF (.2) do not account for, or control for, the effects on car prces of any other explanatory varables apart from weght. ECON 35* -- Fall 28: Stata Tutoral 6 Page 3 of 2 pages

14 ECONOMICS 35* -- Stata Tutoral 6 Analytcally, ths means that the slope coeffcent β n the smple lnear regresson model (.)/ (.2) corresponds to the total dervatve of mean car prce wth respect to weght : d E ( prce weght ) d weght d ( β + β weght β n Model d weght the unadjusted or total margnal effect of weght on the mean prce of cars sold n North Amerca n 978 the change n mean car prce, n 978 US dollars, assocated wth a - pound ncrease n car weght In contrast, the slope coeffcent β n the multple lnear regresson model 2 gven by equatons (.) and (.2) s the adjusted or partal margnal effect of car weght on mean car prce, because PRE (.) and PRF (.2) account for, or control for, the effect on car prces of another explanatory varable apart from weght, namely cars fuel effcency as measured by mles-per-gallon mpg. Analytcally, ths means that the slope coeffcent β n the multple lnear regresson model (.)/ (.2) corresponds to the partal dervatve of mean car prce wth respect to weght : E ( prce weght, mpg ) weght ( β ) + βweght + β2mpg weght ) β n Model 2 the adjusted or partal margnal effect of weght on the condtonal mean prce of cars sold n North Amerca n 978 the change n condtonal mean car prce, n 978 US dollars, assocated wth a -pound ncrease n car weght, holdng constant the fuel effcency of cars as measured by mpg the change n condtonal mean car prce, n 978 US dollars, assocated wth a -pound ncrease n car weght for cars of the same fuel effcency. To llustrate the dfference between the slope coeffcent of weght n the smple lnear regresson model, Model, and the slope coeffcent of weght n the ECON 35* -- Fall 28: Stata Tutoral 6 Page 4 of 2 pages

15 ECONOMICS 35* -- Stata Tutoral 6 multple lnear regresson model, Model 2, we wll use the Stata regress command to compute OLS estmates of the two models. Interpretng the slope coeffcent estmate of weght n Model Wrte the OLS sample regresson functon (SRF) for Model as ~ prce ~ ~ β + β weght (.3) ~ ~ where β j denotes the OLS estmate of β j n Model, and prce s the OLS estmate of mean car prce gven by the populaton regresson functon (PRF) E( prce weght ) β + βweght for Model, the smple lnear regresson model gven by PRE (.) and PRF (.2). The OLS SRF (.3) for Model mples that the estmated change n mean car prce assocated wth a change n car weght of Δ weght s ~ ~ Δ prce βδweght (.4) In Model, the estmated effect on mean car prce of a -pound ncrease n car weght can be obtaned by settng Δ weght n equaton (.4): ~ Δ prce β ~ when Δ weght (.5) ~ The slope coeffcent estmate β n Model s therefore an estmate of the change n mean car prce assocated wth a -pound ncrease n weght, holdng constant no other explanatory varables that may be related to car prce. Interpretng the slope coeffcent estmate of weght n Model 2 Wrte the OLS sample regresson functon (SRF) for Model 2, obtaned by OLS estmaton of the multple lnear regresson equaton (.), as prîce βˆ + βˆ weght + βˆ mpg (.3) 2 ECON 35* -- Fall 28: Stata Tutoral 6 Page 5 of 2 pages

16 ECONOMICS 35* -- Stata Tutoral 6 where ˆβ j denotes the OLS estmate of β j n Model 2, and prîce s the OLS estmate of mean car prce gven by the populaton regresson functon (PRF) prce weght β + β weght + β mpg for Model 2, the multple lnear ( ) E 2 regresson model gven by PRE (.) and PRF (.2). The OLS SRF (.3) mples that the estmated change n mean car prce assocated wth a change n car weght of Δ weght and a smultaneous change n fuel effcency of Δ mpg s Δ prîce βˆ weght ˆ Δ + β2δmpg (.4) We can hold constant the fuel effcency of cars by settng Δ mpg n equaton (.4); the resultng change n estmated mean car prce s then Δ prîce βˆ Δweght when Δ mpg (.5) In Model 2, the estmated effect on mean car prce of a -pound ncrease n car weght when fuel effcency s held constant can be obtaned by settng Δweght n equaton (.5), or equvalently by settng Δ weght and Δmpg n equaton (.4): Δ prîce β ˆ when Δ weght and Δ mpg (.6) The slope coeffcent estmate ˆβ n Model 2 s therefore an estmate of the change n mean car prce assocated wth a -pound ncrease n weght, holdng constant fuel effcency as measured by mpg. The followng Stata exercses are desgned to llustrate the precedng analyss of ~ how the slope coeffcent estmate β n the smple lnear regresson model, Model, dffers from the slope coeffcent estmate ˆβ n the multple lnear regresson model, Model 2. It also llustrates the meanng of holdng constant other varables n multple lnear regresson models. These exercses also ntroduce you to an mportant post-estmaton Stata command, the lncom command. ECON 35* -- Fall 28: Stata Tutoral 6 Page 6 of 2 pages

17 ECONOMICS 35* -- Stata Tutoral 6 Stata Exercse : Model Frst, estmate (agan!) by OLS the smple lnear regresson model, Model, on the full sample of observatons n dataset auto.dta. Enter n the Command wndow the followng regress command: regress prce weght Use a Stata lncom command to compute the estmated mean prce of a car that weghs 3, pounds (for whch weght 3),.e., to compute ~ ~ E ~ ( prce weght 3) β + β3. Enter the lncom command: lncom _b[_cons] + _b[weght]*3 Next, ncrease weght by pound, from 3, to 3, pounds. Use another Stata lncom command to compute the estmated mean prce of a car that weghs 3, pounds (for whch weght 3),.e., to compute ~ ~ E ~ ( prce weght 3) β + β3. Enter the lncom command: lncom _b[_cons] + _b[weght]*3 Fnally, use a Stata lncom command to compute the dfference between the estmated mean prce of a car that weghs 3, pounds and the estmated mean prce of a car that weghs 3, pounds,.e., to compute E ~ ( prce weght 3) ( prce weght 3) E ~. ~ ~ ~ ~ β + β3 ( β + β3). ~ ~ ~ β β + β (3 3). ~ β Enter on one lne the lncom command: lncom _b[_cons] + _b[weght]*3 - (_b[_cons] + _b[weght]*3) ECON 35* -- Fall 28: Stata Tutoral 6 Page 7 of 2 pages

18 ECONOMICS 35* -- Stata Tutoral 6 Compare the output of ths last lncom command wth the coeffcent estmate ~ β for the regressor weght produced by the regress command used to estmate Model by OLS. You wll see that they are dentcal. Result of Exercse : We have demonstrated n ths exercse that the slope ~ coeffcent estmate β of the regressor weght n Model s an estmate of the total effect on mean car prce of a -pound ncrease n car weght when no other explanatory varables that mght affect car prce are held constant. Stata Exercse 2: Model 2 Estmate by OLS the multple lnear regresson model, Model 2, on the full sample of 74 observatons n dataset auto.dta. Enter n the Command wndow the followng regress command: regress prce weght mpg Use a Stata lncom command to compute for Model 2 the estmated mean prce of a car that weghs 3, pounds (for whch weght 3) and has fuel effcency equal to 2 mles per gallon (for whch mpg 2),.e., to compute Ê( prce weght 3, mpg 2) ˆ ˆ 3 ˆ β + β + β2 2. Enter the lncom command: lncom _b[_cons] + _b[weght]*3 + _b[mpg]*2 Next, ncrease weght by pound, from 3, to 3, pounds, whle holdng constant fuel effcency at a value of 2 mles-per-gallon. Use another Stata lncom command to compute for Model 2 the estmated mean prce of a car that weghs 3, pounds (for whch weght 3) and has fuel effcency equal to 2 mles per gallon (for whch mpg 2),.e., to compute Ê( prce weght 3, mpg 2) ˆ ˆ 3 ˆ β + β + β2 2. Note that we are holdng fuel effcency constant at mpg 2. Enter the lncom command: lncom _b[_cons] + _b[weght]*3 + _b[mpg]*2 Fnally, use a Stata lncom command to compute the dfference between () the estmated mean prce of a car that weghs 3, pounds and has fuel effcency of 2 mles-per-gallon and (2) the estmated mean prce of a car that ECON 35* -- Fall 28: Stata Tutoral 6 Page 8 of 2 pages

19 ECONOMICS 35* -- Stata Tutoral 6 weghs 3, pounds and has fuel effcency of 2 mles-per-gallon,.e., to compute Ê ( prce weght 3, mpg 2) Ê( prce weght 3, mpg 2) βˆ ˆ 3 ˆ 2 (ˆ ˆ 3 ˆ + β + β2 β + β + β2 2) βˆ β ˆ + βˆ 3+ βˆ 2 βˆ βˆ 3 ˆ 2 β2 ˆβ (3 3) 2 Enter on one lne the lncom command: lncom _b[_cons] + _b[weght]*3 + _b[mpg]*2 - (_b[_cons] + _b[weght]*3 + _b[mpg]*2) Compare the output of ths last lncom command wth the slope coeffcent estmate ˆβ for the regressor weght produced by the regress command used to estmate Model 2 by OLS. You wll see that they are dentcal. Result of Exercse 2: We have demonstrated n ths exercse that the slope coeffcent estmate β ˆ of the regressor weght n Model 2 s an estmate of the partal effect on mean car prce of a -pound ncrease n car weght when fuel effcency as measured by mpg s held constant at some fxed value. ECON 35* -- Fall 28: Stata Tutoral 6 Page 9 of 2 pages

20 ECONOMICS 35* -- Stata Tutoral 6 Preparng to End Your Stata Sesson Before you end your Stata sesson, you should do two thngs. Frst, you may want to save the current dataset (although you wll not need t for future tutorals). Enter the followng save command to save the current dataset as Stata-format dataset auto6.dta: save auto6 Second, close the.log fle you have been recordng. Enter the command: log close End Your Stata Sesson ext To end your Stata sesson, use the ext command. Enter the command: ext or ext, clear Cleanng Up and Clearng Out After returnng to Wndows, you should copy all the fles you have used and created durng your Stata sesson to your own dskette. These fles wll be found n the Stata workng drectory, whch s usually C:\data on the computers n Dunnng 35, and D:\courses on the computers n MC B. There s one fle you wll want to be sure you have: the Stata log fle 35tutoral6.log. If you saved the Stata-format data set auto6.dta, you wll probably want to take t wth you as well. Use the Wndows copy command to copy any fles you want to keep to your own portable electronc storage devce (e.g., flash memory stck) n the E:-drve. Fnally, as a courtesy to other users of the computng classroom, please delete all the fles you have used or created from the Stata workng drectory. ECON 35* -- Fall 28: Stata Tutoral 6 Page 2 of 2 pages

Interpreting Slope Coefficients in Multiple Linear Regression Models: An Example

Interpreting Slope Coefficients in Multiple Linear Regression Models: An Example CONOMICS 5* -- Introducton to NOT CON 5* -- Introducton to NOT : Multple Lnear Regresson Models Interpretng Slope Coeffcents n Multple Lnear Regresson Models: An xample Consder the followng smple lnear

More information

Introduction to Dummy Variable Regressors. 1. An Example of Dummy Variable Regressors

Introduction to Dummy Variable Regressors. 1. An Example of Dummy Variable Regressors ECONOMICS 5* -- Introducton to Dummy Varable Regressors ECON 5* -- Introducton to NOTE Introducton to Dummy Varable Regressors. An Example of Dummy Varable Regressors A model of North Amercan car prces

More information

The Multiple Classical Linear Regression Model (CLRM): Specification and Assumptions. 1. Introduction

The Multiple Classical Linear Regression Model (CLRM): Specification and Assumptions. 1. Introduction ECONOMICS 5* -- NOTE (Summary) ECON 5* -- NOTE The Multple Classcal Lnear Regresson Model (CLRM): Specfcaton and Assumptons. Introducton CLRM stands for the Classcal Lnear Regresson Model. The CLRM s also

More information

Interval Estimation in the Classical Normal Linear Regression Model. 1. Introduction

Interval Estimation in the Classical Normal Linear Regression Model. 1. Introduction ECONOMICS 35* -- NOTE 7 ECON 35* -- NOTE 7 Interval Estmaton n the Classcal Normal Lnear Regresson Model Ths note outlnes the basc elements of nterval estmaton n the Classcal Normal Lnear Regresson Model

More information

Tests of Exclusion Restrictions on Regression Coefficients: Formulation and Interpretation

Tests of Exclusion Restrictions on Regression Coefficients: Formulation and Interpretation ECONOMICS 5* -- NOTE 6 ECON 5* -- NOTE 6 Tests of Excluson Restrctons on Regresson Coeffcents: Formulaton and Interpretaton The populaton regresson equaton (PRE) for the general multple lnear regresson

More information

Chapter 9: Statistical Inference and the Relationship between Two Variables

Chapter 9: Statistical Inference and the Relationship between Two Variables Chapter 9: Statstcal Inference and the Relatonshp between Two Varables Key Words The Regresson Model The Sample Regresson Equaton The Pearson Correlaton Coeffcent Learnng Outcomes After studyng ths chapter,

More information

Linear Regression Analysis: Terminology and Notation

Linear Regression Analysis: Terminology and Notation ECON 35* -- Secton : Basc Concepts of Regresson Analyss (Page ) Lnear Regresson Analyss: Termnology and Notaton Consder the generc verson of the smple (two-varable) lnear regresson model. It s represented

More information

Chapter 2 - The Simple Linear Regression Model S =0. e i is a random error. S β2 β. This is a minimization problem. Solution is a calculus exercise.

Chapter 2 - The Simple Linear Regression Model S =0. e i is a random error. S β2 β. This is a minimization problem. Solution is a calculus exercise. Chapter - The Smple Lnear Regresson Model The lnear regresson equaton s: where y + = β + β e for =,..., y and are observable varables e s a random error How can an estmaton rule be constructed for the

More information

e i is a random error

e i is a random error Chapter - The Smple Lnear Regresson Model The lnear regresson equaton s: where + β + β e for,..., and are observable varables e s a random error How can an estmaton rule be constructed for the unknown

More information

Marginal Effects of Explanatory Variables: Constant or Variable? 1. Constant Marginal Effects of Explanatory Variables: A Starting Point

Marginal Effects of Explanatory Variables: Constant or Variable? 1. Constant Marginal Effects of Explanatory Variables: A Starting Point CONOMICS * -- NOT CON * -- NOT Margnal ffects of xplanatory Varables: Constant or Varable?. Constant Margnal ffects of xplanatory Varables: A Startng Pont Nature: A contnuous explanatory varable has a

More information

ECONOMICS 351*-A Mid-Term Exam -- Fall Term 2000 Page 1 of 13 pages. QUEEN'S UNIVERSITY AT KINGSTON Department of Economics

ECONOMICS 351*-A Mid-Term Exam -- Fall Term 2000 Page 1 of 13 pages. QUEEN'S UNIVERSITY AT KINGSTON Department of Economics ECOOMICS 35*-A Md-Term Exam -- Fall Term 000 Page of 3 pages QUEE'S UIVERSITY AT KIGSTO Department of Economcs ECOOMICS 35* - Secton A Introductory Econometrcs Fall Term 000 MID-TERM EAM ASWERS MG Abbott

More information

Dummy variables in multiple variable regression model

Dummy variables in multiple variable regression model WESS Econometrcs (Handout ) Dummy varables n multple varable regresson model. Addtve dummy varables In the prevous handout we consdered the followng regresson model: y x 2x2 k xk,, 2,, n and we nterpreted

More information

β0 + β1xi. You are interested in estimating the unknown parameters β

β0 + β1xi. You are interested in estimating the unknown parameters β Ordnary Least Squares (OLS): Smple Lnear Regresson (SLR) Analytcs The SLR Setup Sample Statstcs Ordnary Least Squares (OLS): FOCs and SOCs Back to OLS and Sample Statstcs Predctons (and Resduals) wth OLS

More information

ECON 351* -- Note 23: Tests for Coefficient Differences: Examples Introduction. Sample data: A random sample of 534 paid employees.

ECON 351* -- Note 23: Tests for Coefficient Differences: Examples Introduction. Sample data: A random sample of 534 paid employees. Model and Data ECON 35* -- NOTE 3 Tests for Coeffcent Dfferences: Examples. Introducton Sample data: A random sample of 534 pad employees. Varable defntons: W hourly wage rate of employee ; lnw the natural

More information

Statistics MINITAB - Lab 2

Statistics MINITAB - Lab 2 Statstcs 20080 MINITAB - Lab 2 1. Smple Lnear Regresson In smple lnear regresson we attempt to model a lnear relatonshp between two varables wth a straght lne and make statstcal nferences concernng that

More information

Econ107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4)

Econ107 Applied Econometrics Topic 3: Classical Model (Studenmund, Chapter 4) I. Classcal Assumptons Econ7 Appled Econometrcs Topc 3: Classcal Model (Studenmund, Chapter 4) We have defned OLS and studed some algebrac propertes of OLS. In ths topc we wll study statstcal propertes

More information

Marginal Effects in Probit Models: Interpretation and Testing. 1. Interpreting Probit Coefficients

Marginal Effects in Probit Models: Interpretation and Testing. 1. Interpreting Probit Coefficients ECON 5 -- NOE 15 Margnal Effects n Probt Models: Interpretaton and estng hs note ntroduces you to the two types of margnal effects n probt models: margnal ndex effects, and margnal probablty effects. It

More information

Lecture Notes for STATISTICAL METHODS FOR BUSINESS II BMGT 212. Chapters 14, 15 & 16. Professor Ahmadi, Ph.D. Department of Management

Lecture Notes for STATISTICAL METHODS FOR BUSINESS II BMGT 212. Chapters 14, 15 & 16. Professor Ahmadi, Ph.D. Department of Management Lecture Notes for STATISTICAL METHODS FOR BUSINESS II BMGT 1 Chapters 14, 15 & 16 Professor Ahmad, Ph.D. Department of Management Revsed August 005 Chapter 14 Formulas Smple Lnear Regresson Model: y =

More information

Comparison of Regression Lines

Comparison of Regression Lines STATGRAPHICS Rev. 9/13/2013 Comparson of Regresson Lnes Summary... 1 Data Input... 3 Analyss Summary... 4 Plot of Ftted Model... 6 Condtonal Sums of Squares... 6 Analyss Optons... 7 Forecasts... 8 Confdence

More information

Chapter 13: Multiple Regression

Chapter 13: Multiple Regression Chapter 13: Multple Regresson 13.1 Developng the multple-regresson Model The general model can be descrbed as: It smplfes for two ndependent varables: The sample ft parameter b 0, b 1, and b are used to

More information

x i1 =1 for all i (the constant ).

x i1 =1 for all i (the constant ). Chapter 5 The Multple Regresson Model Consder an economc model where the dependent varable s a functon of K explanatory varables. The economc model has the form: y = f ( x,x,..., ) xk Approxmate ths by

More information

β0 + β1xi. You are interested in estimating the unknown parameters β

β0 + β1xi. You are interested in estimating the unknown parameters β Revsed: v3 Ordnar Least Squares (OLS): Smple Lnear Regresson (SLR) Analtcs The SLR Setup Sample Statstcs Ordnar Least Squares (OLS): FOCs and SOCs Back to OLS and Sample Statstcs Predctons (and Resduals)

More information

Tests of Single Linear Coefficient Restrictions: t-tests and F-tests. 1. Basic Rules. 2. Testing Single Linear Coefficient Restrictions

Tests of Single Linear Coefficient Restrictions: t-tests and F-tests. 1. Basic Rules. 2. Testing Single Linear Coefficient Restrictions ECONOMICS 35* -- NOTE ECON 35* -- NOTE Tests of Sngle Lnear Coeffcent Restrctons: t-tests and -tests Basc Rules Tests of a sngle lnear coeffcent restrcton can be performed usng ether a two-taled t-test

More information

STAT 3008 Applied Regression Analysis

STAT 3008 Applied Regression Analysis STAT 3008 Appled Regresson Analyss Tutoral : Smple Lnear Regresson LAI Chun He Department of Statstcs, The Chnese Unversty of Hong Kong 1 Model Assumpton To quantfy the relatonshp between two factors,

More information

SIMPLE LINEAR REGRESSION

SIMPLE LINEAR REGRESSION Smple Lnear Regresson and Correlaton Introducton Prevousl, our attenton has been focused on one varable whch we desgnated b x. Frequentl, t s desrable to learn somethng about the relatonshp between two

More information

Chapter 14 Simple Linear Regression

Chapter 14 Simple Linear Regression Chapter 4 Smple Lnear Regresson Chapter 4 - Smple Lnear Regresson Manageral decsons often are based on the relatonshp between two or more varables. Regresson analss can be used to develop an equaton showng

More information

[The following data appear in Wooldridge Q2.3.] The table below contains the ACT score and college GPA for eight college students.

[The following data appear in Wooldridge Q2.3.] The table below contains the ACT score and college GPA for eight college students. PPOL 59-3 Problem Set Exercses n Smple Regresson Due n class /8/7 In ths problem set, you are asked to compute varous statstcs by hand to gve you a better sense of the mechancs of the Pearson correlaton

More information

ECONOMICS 452* -- Stata 9 Tutorial 6. Stata 9 Tutorial 6. TOPIC: Estimating and Interpreting Probit Models with Stata: Introduction

ECONOMICS 452* -- Stata 9 Tutorial 6. Stata 9 Tutorial 6. TOPIC: Estimating and Interpreting Probit Models with Stata: Introduction ECONOMICS 45* -- Stata 9 utoral 6 Stata 9 utoral 6 OPIC: Estmatng and Interpretng Probt Models wth Stata: Introducton DAA: mroz.raw (a text-format (ASCII) data fle) ASKS: Stata 9 utoral 6 demonstrates

More information

Resource Allocation and Decision Analysis (ECON 8010) Spring 2014 Foundations of Regression Analysis

Resource Allocation and Decision Analysis (ECON 8010) Spring 2014 Foundations of Regression Analysis Resource Allocaton and Decson Analss (ECON 800) Sprng 04 Foundatons of Regresson Analss Readng: Regresson Analss (ECON 800 Coursepak, Page 3) Defntons and Concepts: Regresson Analss statstcal technques

More information

January Examinations 2015

January Examinations 2015 24/5 Canddates Only January Examnatons 25 DO NOT OPEN THE QUESTION PAPER UNTIL INSTRUCTED TO DO SO BY THE CHIEF INVIGILATOR STUDENT CANDIDATE NO.. Department Module Code Module Ttle Exam Duraton (n words)

More information

since [1-( 0+ 1x1i+ 2x2 i)] [ 0+ 1x1i+ assumed to be a reasonable approximation

since [1-( 0+ 1x1i+ 2x2 i)] [ 0+ 1x1i+ assumed to be a reasonable approximation Econ 388 R. Butler 204 revsons Lecture 4 Dummy Dependent Varables I. Lnear Probablty Model: the Regresson model wth a dummy varables as the dependent varable assumpton, mplcaton regular multple regresson

More information

Econ Statistical Properties of the OLS estimator. Sanjaya DeSilva

Econ Statistical Properties of the OLS estimator. Sanjaya DeSilva Econ 39 - Statstcal Propertes of the OLS estmator Sanjaya DeSlva September, 008 1 Overvew Recall that the true regresson model s Y = β 0 + β 1 X + u (1) Applyng the OLS method to a sample of data, we estmate

More information

III. Econometric Methodology Regression Analysis

III. Econometric Methodology Regression Analysis Page Econ07 Appled Econometrcs Topc : An Overvew of Regresson Analyss (Studenmund, Chapter ) I. The Nature and Scope of Econometrcs. Lot s of defntons of econometrcs. Nobel Prze Commttee Paul Samuelson,

More information

Correlation and Regression. Correlation 9.1. Correlation. Chapter 9

Correlation and Regression. Correlation 9.1. Correlation. Chapter 9 Chapter 9 Correlaton and Regresson 9. Correlaton Correlaton A correlaton s a relatonshp between two varables. The data can be represented b the ordered pars (, ) where s the ndependent (or eplanator) varable,

More information

Economics 130. Lecture 4 Simple Linear Regression Continued

Economics 130. Lecture 4 Simple Linear Regression Continued Economcs 130 Lecture 4 Contnued Readngs for Week 4 Text, Chapter and 3. We contnue wth addressng our second ssue + add n how we evaluate these relatonshps: Where do we get data to do ths analyss? How do

More information

Chapter 11: Simple Linear Regression and Correlation

Chapter 11: Simple Linear Regression and Correlation Chapter 11: Smple Lnear Regresson and Correlaton 11-1 Emprcal Models 11-2 Smple Lnear Regresson 11-3 Propertes of the Least Squares Estmators 11-4 Hypothess Test n Smple Lnear Regresson 11-4.1 Use of t-tests

More information

Lecture 3 Stat102, Spring 2007

Lecture 3 Stat102, Spring 2007 Lecture 3 Stat0, Sprng 007 Chapter 3. 3.: Introducton to regresson analyss Lnear regresson as a descrptve technque The least-squares equatons Chapter 3.3 Samplng dstrbuton of b 0, b. Contnued n net lecture

More information

Lecture 6: Introduction to Linear Regression

Lecture 6: Introduction to Linear Regression Lecture 6: Introducton to Lnear Regresson An Manchakul amancha@jhsph.edu 24 Aprl 27 Lnear regresson: man dea Lnear regresson can be used to study an outcome as a lnear functon of a predctor Example: 6

More information

Introduction to Regression

Introduction to Regression Introducton to Regresson Dr Tom Ilvento Department of Food and Resource Economcs Overvew The last part of the course wll focus on Regresson Analyss Ths s one of the more powerful statstcal technques Provdes

More information

Negative Binomial Regression

Negative Binomial Regression STATGRAPHICS Rev. 9/16/2013 Negatve Bnomal Regresson Summary... 1 Data Input... 3 Statstcal Model... 3 Analyss Summary... 4 Analyss Optons... 7 Plot of Ftted Model... 8 Observed Versus Predcted... 10 Predctons...

More information

Psychology 282 Lecture #24 Outline Regression Diagnostics: Outliers

Psychology 282 Lecture #24 Outline Regression Diagnostics: Outliers Psychology 282 Lecture #24 Outlne Regresson Dagnostcs: Outlers In an earler lecture we studed the statstcal assumptons underlyng the regresson model, ncludng the followng ponts: Formal statement of assumptons.

More information

NUMERICAL DIFFERENTIATION

NUMERICAL DIFFERENTIATION NUMERICAL DIFFERENTIATION 1 Introducton Dfferentaton s a method to compute the rate at whch a dependent output y changes wth respect to the change n the ndependent nput x. Ths rate of change s called the

More information

This column is a continuation of our previous column

This column is a continuation of our previous column Comparson of Goodness of Ft Statstcs for Lnear Regresson, Part II The authors contnue ther dscusson of the correlaton coeffcent n developng a calbraton for quanttatve analyss. Jerome Workman Jr. and Howard

More information

The Ordinary Least Squares (OLS) Estimator

The Ordinary Least Squares (OLS) Estimator The Ordnary Least Squares (OLS) Estmator 1 Regresson Analyss Regresson Analyss: a statstcal technque for nvestgatng and modelng the relatonshp between varables. Applcatons: Engneerng, the physcal and chemcal

More information

Outline. Zero Conditional mean. I. Motivation. 3. Multiple Regression Analysis: Estimation. Read Wooldridge (2013), Chapter 3.

Outline. Zero Conditional mean. I. Motivation. 3. Multiple Regression Analysis: Estimation. Read Wooldridge (2013), Chapter 3. Outlne 3. Multple Regresson Analyss: Estmaton I. Motvaton II. Mechancs and Interpretaton of OLS Read Wooldrdge (013), Chapter 3. III. Expected Values of the OLS IV. Varances of the OLS V. The Gauss Markov

More information

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U)

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U) Econ 413 Exam 13 H ANSWERS Settet er nndelt 9 deloppgaver, A,B,C, som alle anbefales å telle lkt for å gøre det ltt lettere å stå. Svar er gtt . Unfortunately, there s a prntng error n the hnt of

More information

ECONOMETRICS - FINAL EXAM, 3rd YEAR (GECO & GADE)

ECONOMETRICS - FINAL EXAM, 3rd YEAR (GECO & GADE) ECONOMETRICS - FINAL EXAM, 3rd YEAR (GECO & GADE) June 7, 016 15:30 Frst famly name: Name: DNI/ID: Moble: Second famly Name: GECO/GADE: Instructor: E-mal: Queston 1 A B C Blank Queston A B C Blank Queston

More information

Here is the rationale: If X and y have a strong positive relationship to one another, then ( x x) will tend to be positive when ( y y)

Here is the rationale: If X and y have a strong positive relationship to one another, then ( x x) will tend to be positive when ( y y) Secton 1.5 Correlaton In the prevous sectons, we looked at regresson and the value r was a measurement of how much of the varaton n y can be attrbuted to the lnear relatonshp between y and x. In ths secton,

More information

1. Inference on Regression Parameters a. Finding Mean, s.d and covariance amongst estimates. 2. Confidence Intervals and Working Hotelling Bands

1. Inference on Regression Parameters a. Finding Mean, s.d and covariance amongst estimates. 2. Confidence Intervals and Working Hotelling Bands Content. Inference on Regresson Parameters a. Fndng Mean, s.d and covarance amongst estmates.. Confdence Intervals and Workng Hotellng Bands 3. Cochran s Theorem 4. General Lnear Testng 5. Measures of

More information

Statistics II Final Exam 26/6/18

Statistics II Final Exam 26/6/18 Statstcs II Fnal Exam 26/6/18 Academc Year 2017/18 Solutons Exam duraton: 2 h 30 mn 1. (3 ponts) A town hall s conductng a study to determne the amount of leftover food produced by the restaurants n the

More information

More metrics on cartesian products

More metrics on cartesian products More metrcs on cartesan products If (X, d ) are metrc spaces for 1 n, then n Secton II4 of the lecture notes we defned three metrcs on X whose underlyng topologes are the product topology The purpose of

More information

LECTURE 9 CANONICAL CORRELATION ANALYSIS

LECTURE 9 CANONICAL CORRELATION ANALYSIS LECURE 9 CANONICAL CORRELAION ANALYSIS Introducton he concept of canoncal correlaton arses when we want to quantfy the assocatons between two sets of varables. For example, suppose that the frst set of

More information

Linear Approximation with Regularization and Moving Least Squares

Linear Approximation with Regularization and Moving Least Squares Lnear Approxmaton wth Regularzaton and Movng Least Squares Igor Grešovn May 007 Revson 4.6 (Revson : March 004). 5 4 3 0.5 3 3.5 4 Contents: Lnear Fttng...4. Weghted Least Squares n Functon Approxmaton...

More information

Statistics for Managers Using Microsoft Excel/SPSS Chapter 13 The Simple Linear Regression Model and Correlation

Statistics for Managers Using Microsoft Excel/SPSS Chapter 13 The Simple Linear Regression Model and Correlation Statstcs for Managers Usng Mcrosoft Excel/SPSS Chapter 13 The Smple Lnear Regresson Model and Correlaton 1999 Prentce-Hall, Inc. Chap. 13-1 Chapter Topcs Types of Regresson Models Determnng the Smple Lnear

More information

/ n ) are compared. The logic is: if the two

/ n ) are compared. The logic is: if the two STAT C141, Sprng 2005 Lecture 13 Two sample tests One sample tests: examples of goodness of ft tests, where we are testng whether our data supports predctons. Two sample tests: called as tests of ndependence

More information

Biostatistics 360 F&t Tests and Intervals in Regression 1

Biostatistics 360 F&t Tests and Intervals in Regression 1 Bostatstcs 360 F&t Tests and Intervals n Regresson ORIGIN Model: Y = X + Corrected Sums of Squares: X X bar where: s the y ntercept of the regresson lne (translaton) s the slope of the regresson lne (scalng

More information

Properties of Least Squares

Properties of Least Squares Week 3 3.1 Smple Lnear Regresson Model 3. Propertes of Least Squares Estmators Y Y β 1 + β X + u weekly famly expendtures X weekly famly ncome For a gven level of x, the expected level of food expendtures

More information

Chapter 14 Simple Linear Regression Page 1. Introduction to regression analysis 14-2

Chapter 14 Simple Linear Regression Page 1. Introduction to regression analysis 14-2 Chapter 4 Smple Lnear Regresson Page. Introducton to regresson analyss 4- The Regresson Equaton. Lnear Functons 4-4 3. Estmaton and nterpretaton of model parameters 4-6 4. Inference on the model parameters

More information

Lecture 9: Linear regression: centering, hypothesis testing, multiple covariates, and confounding

Lecture 9: Linear regression: centering, hypothesis testing, multiple covariates, and confounding Recall: man dea of lnear regresson Lecture 9: Lnear regresson: centerng, hypothess testng, multple covarates, and confoundng Sandy Eckel seckel@jhsph.edu 6 May 8 Lnear regresson can be used to study an

More information

Lecture 9: Linear regression: centering, hypothesis testing, multiple covariates, and confounding

Lecture 9: Linear regression: centering, hypothesis testing, multiple covariates, and confounding Lecture 9: Lnear regresson: centerng, hypothess testng, multple covarates, and confoundng Sandy Eckel seckel@jhsph.edu 6 May 008 Recall: man dea of lnear regresson Lnear regresson can be used to study

More information

APPENDIX 2 FITTING A STRAIGHT LINE TO OBSERVATIONS

APPENDIX 2 FITTING A STRAIGHT LINE TO OBSERVATIONS Unversty of Oulu Student Laboratory n Physcs Laboratory Exercses n Physcs 1 1 APPEDIX FITTIG A STRAIGHT LIE TO OBSERVATIOS In the physcal measurements we often make a seres of measurements of the dependent

More information

Basically, if you have a dummy dependent variable you will be estimating a probability.

Basically, if you have a dummy dependent variable you will be estimating a probability. ECON 497: Lecture Notes 13 Page 1 of 1 Metropoltan State Unversty ECON 497: Research and Forecastng Lecture Notes 13 Dummy Dependent Varable Technques Studenmund Chapter 13 Bascally, f you have a dummy

More information

Limited Dependent Variables

Limited Dependent Variables Lmted Dependent Varables. What f the left-hand sde varable s not a contnuous thng spread from mnus nfnty to plus nfnty? That s, gven a model = f (, β, ε, where a. s bounded below at zero, such as wages

More information

STAT 3340 Assignment 1 solutions. 1. Find the equation of the line which passes through the points (1,1) and (4,5).

STAT 3340 Assignment 1 solutions. 1. Find the equation of the line which passes through the points (1,1) and (4,5). (out of 15 ponts) STAT 3340 Assgnment 1 solutons (10) (10) 1. Fnd the equaton of the lne whch passes through the ponts (1,1) and (4,5). β 1 = (5 1)/(4 1) = 4/3 equaton for the lne s y y 0 = β 1 (x x 0

More information

Midterm Examination. Regression and Forecasting Models

Midterm Examination. Regression and Forecasting Models IOMS Department Regresson and Forecastng Models Professor Wllam Greene Phone: 22.998.0876 Offce: KMC 7-90 Home page: people.stern.nyu.edu/wgreene Emal: wgreene@stern.nyu.edu Course web page: people.stern.nyu.edu/wgreene/regresson/outlne.htm

More information

Chapter 8 Indicator Variables

Chapter 8 Indicator Variables Chapter 8 Indcator Varables In general, e explanatory varables n any regresson analyss are assumed to be quanttatve n nature. For example, e varables lke temperature, dstance, age etc. are quanttatve n

More information

a. (All your answers should be in the letter!

a. (All your answers should be in the letter! Econ 301 Blkent Unversty Taskn Econometrcs Department of Economcs Md Term Exam I November 8, 015 Name For each hypothess testng n the exam complete the followng steps: Indcate the test statstc, ts crtcal

More information

F8: Heteroscedasticity

F8: Heteroscedasticity F8: Heteroscedastcty Feng L Department of Statstcs, Stockholm Unversty What s so-called heteroscedastcty In a lnear regresson model, we assume the error term has a normal dstrbuton wth mean zero and varance

More information

Kernel Methods and SVMs Extension

Kernel Methods and SVMs Extension Kernel Methods and SVMs Extenson The purpose of ths document s to revew materal covered n Machne Learnng 1 Supervsed Learnng regardng support vector machnes (SVMs). Ths document also provdes a general

More information

LINEAR REGRESSION ANALYSIS. MODULE VIII Lecture Indicator Variables

LINEAR REGRESSION ANALYSIS. MODULE VIII Lecture Indicator Variables LINEAR REGRESSION ANALYSIS MODULE VIII Lecture - 7 Indcator Varables Dr. Shalabh Department of Maematcs and Statstcs Indan Insttute of Technology Kanpur Indcator varables versus quanttatve explanatory

More information

Diagnostics in Poisson Regression. Models - Residual Analysis

Diagnostics in Poisson Regression. Models - Residual Analysis Dagnostcs n Posson Regresson Models - Resdual Analyss 1 Outlne Dagnostcs n Posson Regresson Models - Resdual Analyss Example 3: Recall of Stressful Events contnued 2 Resdual Analyss Resduals represent

More information

Laboratory 3: Method of Least Squares

Laboratory 3: Method of Least Squares Laboratory 3: Method of Least Squares Introducton Consder the graph of expermental data n Fgure 1. In ths experment x s the ndependent varable and y the dependent varable. Clearly they are correlated wth

More information

Analytical Chemistry Calibration Curve Handout

Analytical Chemistry Calibration Curve Handout I. Quck-and Drty Excel Tutoral Analytcal Chemstry Calbraton Curve Handout For those of you wth lttle experence wth Excel, I ve provded some key technques that should help you use the program both for problem

More information

Linear Feature Engineering 11

Linear Feature Engineering 11 Lnear Feature Engneerng 11 2 Least-Squares 2.1 Smple least-squares Consder the followng dataset. We have a bunch of nputs x and correspondng outputs y. The partcular values n ths dataset are x y 0.23 0.19

More information

Department of Quantitative Methods & Information Systems. Time Series and Their Components QMIS 320. Chapter 6

Department of Quantitative Methods & Information Systems. Time Series and Their Components QMIS 320. Chapter 6 Department of Quanttatve Methods & Informaton Systems Tme Seres and Ther Components QMIS 30 Chapter 6 Fall 00 Dr. Mohammad Zanal These sldes were modfed from ther orgnal source for educatonal purpose only.

More information

x yi In chapter 14, we want to perform inference (i.e. calculate confidence intervals and perform tests of significance) in this setting.

x yi In chapter 14, we want to perform inference (i.e. calculate confidence intervals and perform tests of significance) in this setting. The Practce of Statstcs, nd ed. Chapter 14 Inference for Regresson Introducton In chapter 3 we used a least-squares regresson lne (LSRL) to represent a lnear relatonshp etween two quanttatve explanator

More information

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0 MODULE 2 Topcs: Lnear ndependence, bass and dmenson We have seen that f n a set of vectors one vector s a lnear combnaton of the remanng vectors n the set then the span of the set s unchanged f that vector

More information

Statistics for Business and Economics

Statistics for Business and Economics Statstcs for Busness and Economcs Chapter 11 Smple Regresson Copyrght 010 Pearson Educaton, Inc. Publshng as Prentce Hall Ch. 11-1 11.1 Overvew of Lnear Models n An equaton can be ft to show the best lnear

More information

Number of cases Number of factors Number of covariates Number of levels of factor i. Value of the dependent variable for case k

Number of cases Number of factors Number of covariates Number of levels of factor i. Value of the dependent variable for case k ANOVA Model and Matrx Computatons Notaton The followng notaton s used throughout ths chapter unless otherwse stated: N F CN Y Z j w W Number of cases Number of factors Number of covarates Number of levels

More information

Statistics for Economics & Business

Statistics for Economics & Business Statstcs for Economcs & Busness Smple Lnear Regresson Learnng Objectves In ths chapter, you learn: How to use regresson analyss to predct the value of a dependent varable based on an ndependent varable

More information

Learning Objectives for Chapter 11

Learning Objectives for Chapter 11 Chapter : Lnear Regresson and Correlaton Methods Hldebrand, Ott and Gray Basc Statstcal Ideas for Managers Second Edton Learnng Objectves for Chapter Usng the scatterplot n regresson analyss Usng the method

More information

Lab 4: Two-level Random Intercept Model

Lab 4: Two-level Random Intercept Model BIO 656 Lab4 009 Lab 4: Two-level Random Intercept Model Data: Peak expratory flow rate (pefr) measured twce, usng two dfferent nstruments, for 17 subjects. (from Chapter 1 of Multlevel and Longtudnal

More information

Chapter 15 - Multiple Regression

Chapter 15 - Multiple Regression Chapter - Multple Regresson Chapter - Multple Regresson Multple Regresson Model The equaton that descrbes how the dependent varable y s related to the ndependent varables x, x,... x p and an error term

More information

THE ROYAL STATISTICAL SOCIETY 2006 EXAMINATIONS SOLUTIONS HIGHER CERTIFICATE

THE ROYAL STATISTICAL SOCIETY 2006 EXAMINATIONS SOLUTIONS HIGHER CERTIFICATE THE ROYAL STATISTICAL SOCIETY 6 EXAMINATIONS SOLUTIONS HIGHER CERTIFICATE PAPER I STATISTICAL THEORY The Socety provdes these solutons to assst canddates preparng for the eamnatons n future years and for

More information

Module Contact: Dr Susan Long, ECO Copyright of the University of East Anglia Version 1

Module Contact: Dr Susan Long, ECO Copyright of the University of East Anglia Version 1 UNIVERSITY OF EAST ANGLIA School of Economcs Man Seres PG Examnaton 016-17 ECONOMETRIC METHODS ECO-7000A Tme allowed: hours Answer ALL FOUR Questons. Queston 1 carres a weght of 5%; Queston carres 0%;

More information

Question 1 carries a weight of 25%; question 2 carries 20%; question 3 carries 25%; and question 4 carries 30%.

Question 1 carries a weight of 25%; question 2 carries 20%; question 3 carries 25%; and question 4 carries 30%. UNIVERSITY OF EAST ANGLIA School of Economcs Man Seres PGT Examnaton 017-18 FINANCIAL ECONOMETRICS ECO-7009A Tme allowed: HOURS Answer ALL FOUR questons. Queston 1 carres a weght of 5%; queston carres

More information

CALCULUS CLASSROOM CAPSULES

CALCULUS CLASSROOM CAPSULES CALCULUS CLASSROOM CAPSULES SESSION S86 Dr. Sham Alfred Rartan Valley Communty College salfred@rartanval.edu 38th AMATYC Annual Conference Jacksonvlle, Florda November 8-, 202 2 Calculus Classroom Capsules

More information

MA 323 Geometric Modelling Course Notes: Day 13 Bezier Curves & Bernstein Polynomials

MA 323 Geometric Modelling Course Notes: Day 13 Bezier Curves & Bernstein Polynomials MA 323 Geometrc Modellng Course Notes: Day 13 Bezer Curves & Bernsten Polynomals Davd L. Fnn Over the past few days, we have looked at de Casteljau s algorthm for generatng a polynomal curve, and we have

More information

Lecture 19. Endogenous Regressors and Instrumental Variables

Lecture 19. Endogenous Regressors and Instrumental Variables Lecture 19. Endogenous Regressors and Instrumental Varables In the prevous lecture we consder a regresson model (I omt the subscrpts (1) Y β + D + u = 1 β The problem s that the dummy varable D s endogenous,.e.

More information

where I = (n x n) diagonal identity matrix with diagonal elements = 1 and off-diagonal elements = 0; and σ 2 e = variance of (Y X).

where I = (n x n) diagonal identity matrix with diagonal elements = 1 and off-diagonal elements = 0; and σ 2 e = variance of (Y X). 11.4.1 Estmaton of Multple Regresson Coeffcents In multple lnear regresson, we essentally solve n equatons for the p unnown parameters. hus n must e equal to or greater than p and n practce n should e

More information

Chapter 7 Generalized and Weighted Least Squares Estimation. In this method, the deviation between the observed and expected values of

Chapter 7 Generalized and Weighted Least Squares Estimation. In this method, the deviation between the observed and expected values of Chapter 7 Generalzed and Weghted Least Squares Estmaton The usual lnear regresson model assumes that all the random error components are dentcally and ndependently dstrbuted wth constant varance. When

More information

DO NOT OPEN THE QUESTION PAPER UNTIL INSTRUCTED TO DO SO BY THE CHIEF INVIGILATOR. Introductory Econometrics 1 hour 30 minutes

DO NOT OPEN THE QUESTION PAPER UNTIL INSTRUCTED TO DO SO BY THE CHIEF INVIGILATOR. Introductory Econometrics 1 hour 30 minutes 25/6 Canddates Only January Examnatons 26 Student Number: Desk Number:...... DO NOT OPEN THE QUESTION PAPER UNTIL INSTRUCTED TO DO SO BY THE CHIEF INVIGILATOR Department Module Code Module Ttle Exam Duraton

More information

STAT 405 BIOSTATISTICS (Fall 2016) Handout 15 Introduction to Logistic Regression

STAT 405 BIOSTATISTICS (Fall 2016) Handout 15 Introduction to Logistic Regression STAT 45 BIOSTATISTICS (Fall 26) Handout 5 Introducton to Logstc Regresson Ths handout covers materal found n Secton 3.7 of your text. You may also want to revew regresson technques n Chapter. In ths handout,

More information

Chapter 3. Two-Variable Regression Model: The Problem of Estimation

Chapter 3. Two-Variable Regression Model: The Problem of Estimation Chapter 3. Two-Varable Regresson Model: The Problem of Estmaton Ordnary Least Squares Method (OLS) Recall that, PRF: Y = β 1 + β X + u Thus, snce PRF s not drectly observable, t s estmated by SRF; that

More information

Econometrics: What's It All About, Alfie?

Econometrics: What's It All About, Alfie? ECON 351* -- Introducton (Page 1) Econometrcs: What's It All About, Ale? Usng sample data on observable varables to learn about economc relatonshps, the unctonal relatonshps among economc varables. Econometrcs

More information

Difference Equations

Difference Equations Dfference Equatons c Jan Vrbk 1 Bascs Suppose a sequence of numbers, say a 0,a 1,a,a 3,... s defned by a certan general relatonshp between, say, three consecutve values of the sequence, e.g. a + +3a +1

More information

Chapter 6. Supplemental Text Material

Chapter 6. Supplemental Text Material Chapter 6. Supplemental Text Materal S6-. actor Effect Estmates are Least Squares Estmates We have gven heurstc or ntutve explanatons of how the estmates of the factor effects are obtaned n the textboo.

More information

Y = β 0 + β 1 X 1 + β 2 X β k X k + ε

Y = β 0 + β 1 X 1 + β 2 X β k X k + ε Chapter 3 Secton 3.1 Model Assumptons: Multple Regresson Model Predcton Equaton Std. Devaton of Error Correlaton Matrx Smple Lnear Regresson: 1.) Lnearty.) Constant Varance 3.) Independent Errors 4.) Normalty

More information

28. SIMPLE LINEAR REGRESSION III

28. SIMPLE LINEAR REGRESSION III 8. SIMPLE LINEAR REGRESSION III Ftted Values and Resduals US Domestc Beers: Calores vs. % Alcohol To each observed x, there corresponds a y-value on the ftted lne, y ˆ = βˆ + βˆ x. The are called ftted

More information

ANOVA. The Observations y ij

ANOVA. The Observations y ij ANOVA Stands for ANalyss Of VArance But t s a test of dfferences n means The dea: The Observatons y j Treatment group = 1 = 2 = k y 11 y 21 y k,1 y 12 y 22 y k,2 y 1, n1 y 2, n2 y k, nk means: m 1 m 2

More information