Part a set variable labels for graph label variable

Info icon This preview shows pages 12–16. Sign up to view the full content.

View Full Document Right Arrow Icon
. ***part (a)*** . *set variable labels for graph . label variable growth "Average Annual Growth Rate" . lab var tradeshare "Average Trade Share" . . *create and save graph . scatter growth tradeshare, /// > title("Ex 4.1(a): Relationship between Growth and Trade Share") . graph export graph41a.png, replace (file graph41a.png written in PNG format) . . * See graph 1(a) that follows. . * The graph shows a positive relationship between growth and trade share. . . ***part (b)*** . . * Plot the graph with the points labeled to identify Malta . scatter growth tradeshare, /// > title("Ex 4.1(b): Growth and Trade Share with labels") /// > mlabel(country_name) mlabpos(9) . graph export graph41b.png, replace (file graph41b.png written in PNG format) . . * See graph 1(b) that follows. . * (note: you don’t need to print this output) 12
Image of page 12

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

View Full Document Right Arrow Icon
. * Malta is easily identifiable as the outlier in the upper right. . . ***part (c)*** . regress growth tradeshare, robust Linear regression Number of obs = 65 F(1, 63) = 12.09 Prob > F = 0.0009 R-squared = 0.1237 Root MSE = 1.79 ------------------------------------------------------------------------------ | Robust growth | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- tradeshare | 2.306434 .6632868 3.48 0.001 .9809608 3.631907 _cons | .6402653 .4591457 1.39 0.168 -.2772641 1.557795 ------------------------------------------------------------------------------ . . * The estimated slope is 2.31; the estimated intercept is 0.64. . . * The predicted growth rate is 0.64 + 2.31 * (trade_share), or . display 0.64 + 2.31 * 0.5 1.795 . * for a trade share of 0.5 and . display 0.64 + 2.31 * 1.0 2.95 . * for a trade share of 1.0. . . ***part (d)*** . * Exclude data from Malta using an "if" statement . regress growth tradeshare if country_name != "Malta", robust Linear regression Number of obs = 64 F(1, 62) = 3.77 Prob > F = 0.0567 R-squared = 0.0447 Root MSE = 1.7894 ------------------------------------------------------------------------------ | Robust growth | Coef. Std. Err. t P>|t| [95% Conf. Interval] 13
Image of page 13
-------------+---------------------------------------------------------------- tradeshare | 1.680905 .8656171 1.94 0.057 -.0494392 3.411249 _cons | .9574107 .5360579 1.79 0.079 -.1141537 2.028975 ------------------------------------------------------------------------------ . . * The estimated slope is 1.68; the estimated intercept is 0.96. . . * The predicted growth rate is 0.96 + 1.68 * (trade_share), or . display 0.96 + 1.68 * 0.5 1.8 . * for a trade share of 0.5 and . display 0.96 + 1.68 * 1.0 2.64 . * for a trade share of 1.0. . . ***part (e)*** . * To plot the functions, rerun the regressions and save the predicted values . * using "predict" . quietly regress growth tradeshare, robust . predict reg_all (option xb assumed; fitted values) . lab var reg_all "Predicted values, all countries" . quietly regress growth tradeshare if country_name != "Malta", robust . predict reg_nomalta (option xb assumed; fitted values) . lab var reg_nomalta "Predicted values, without Malta" . . scatter growth tradeshare || line reg_all reg_nomalta tradeshare , /// > title("Ex 4.1(e): Relationship between Growth and Trade Share" /// > "across specifications") . graph export graph41e.png, replace (file graph41e.png written in PNG format) . * See graph 1(e) that follows. . 14
Image of page 14

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

View Full Document Right Arrow Icon
Figure 1: Exercise 4.1(a) . * The regression without Malta is flatter because Malta is an outlier with a . * high level of growth for its trade share (that is, above the regression . * line). Thus, including this observation makes the regression line steeper. . . . ***part (f)*** . * Malta is a small island off the coast of Italy, with a population of around . * 500,000 (source: Wikipedia). The country’s trade share is so large because . * it is an island in the middle of the Mediterranean Sea, meaning that 1) . * almost all goods must be imported and 2) the island is a frequent stopover . * for shipments crossing that ocean.
Image of page 15
Image of page 16
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern