Dropdown Graphics Writing Question
1. (9 points) Do Exercises 12-18 (1 pt. each), 26 (2 pts.) from Chapter 10 of the Utts book (see attached file
2. (10 points) Use the “WDI.dta” dataset (see attached file) in STATA. Report and interpret these results:
1) (1 pt.) Calculate the correlation between electricity consumption per capita (v19) and GDP per capita (v25). To do this, type the following into the command line: corr v19 v25
2) (2 pts.) Estimate a linear regression (report the regression equation including the slope and y-intercept) of electricity consumption per capita on GDP per capita. To do this, type the following into the command line: reg v19 v25
3) (1 pt.) Make a scatter plot of these same two variables. To do this, use the dropdown “Graphics” menu or type the following into the command line: twoway (scatter v19 v25)
4) (1 pt.) Make a scatter plot with the regression line included. To do this, use the dropdown “Graphics” menu or type the following into the command line: twoway (scatter v19 v25) (lfit v19 v25)
5) (5 pts.) Repeat all of the previous steps substituting the fertility rate (v21) for electricity consumption.
3. (10 points) Do Exercises 1 (1pt.), 12 (2pts.), 15 (2 pts.), 21 (2 pts.), 36 (1pt.), 37 (2 pts.) from Chapter 13 in the Utts book
Note 1: For calculating the significance of a given chi-square value and degrees of freedom, you can use the following website:
https://www.mathsisfun.com/data/chi-square-calculator.html (Links to an external site.)
Note 2: In STATA, you can calculate a chi-square when you have a frequency table without the original data. To do that you can use the dropdown Statistics window, then the “summaries, tables, and tests” window, then the “frequency table” sub-window, and then the “table calculator” sub-sub-window. Enter table data as it shows. Click the “Pearson’s chi-square” option under test statistic, and the “expected frequencies” under cell contents. Or, you can use the command:
tabi 370 950 300 1003, chi2 expected
where in this command the numbers are values for the cells (370, 950, etc. are examples) and the “” indicates you’re moving on to the next row. So, in this example, it’s a 2×2 table with 370 and 950 in the first row and 300 and 1003 in the second row (these data come from Exercise 21). Separate each number with a space, as shown. Adding the “expected” option gives the calculated expected values.
4. (9 points) STATA exercise: use the Balyor Religion Survey dataset (see attached word file)
* (3 pts.) Create a table and do a chi-square test for the variables measuring region of residence (region) and whether the respondent believes in extraterrestrials (et). To do this, type the following into the command line:
tabulate region et, chi2 expected
Interpret the results.
* (3 pts.) Create table and do a chi-square test for the variables measuring how religious respondents consider themselves to be (relgious) and whether they believe in bigfoot. To do this type the following into the command line:
tabulate relgious bigfoot, chi2 expected
Interpret the results.
* (3 pts.) Present the 90%, 95% and 99% confidence intervals for the proportions of the following variables: gender, xmastree, and homeschl. The command to use is “proportion” followed by the variable name. By default, STATA will tell you the 95% confidence interval. To get a different level, follow the command with a comma and “level(x)” where “x” is the percent confidence interval you’d like. So, for example, to get the 99% confidence interval for homeschl type the following into the command line:
proportion homeschl, level(99)
5. (6 points) Do Exercises: 9 (1pt.), 10 (3pts.), 12 (2 pts.) in Chapter 21 of the Utts book
[For calculating t-multipliers, the following website is easy to use: http://www.ttable.org/student-t-value-calculator.html (Links to an external site.)
Note that for the “significance level” you enter 1 minus the confidence interval you want expressed as a proportion. So for a 95% confidence interval, the significance level is .05. For a 99% confidence interval, it is .01
6. (6 points) In STATA use the Baylor Religion Survey dataset.
Present the 90%, 95% and 99% confidence intervals for the means of the following variables: percwht, perchisp, precblk, and percasn. The command you want to use is “mean” and it has the same syntax as the “proportion” command. So, for example, to get the 90% confidence interval for percblk type the following into the command line:
mean percblk, level(90)