Cologne Center for Comparative Politics
Introduction to Quantitative Methods -- Fall 2018
Bruno Castanho Silva
Assignment 3
Please complete this assignment in R Markdown, including your code and results. Upload
only the “.rmd” file. Make sure it knits into a pdf of no more than 3 pages before uploading.
This assignment will count 15% towards your final grade. The deadline to upload it is
November 13, at 23:55 Central European Time. Do upload your work even if you were not
able to complete one or a few of the tasks, so you can still receive partial credit.
Each student must write and submit their own individual answers.
This time we are using data from the World Values Survey, wave 6 (data attached, in the file
wvs6.dta). The WVS codebook is attached, as “WV6_Codebook_v_2014_11_07.xls”.
Tip: use the following command to read the data:
wvs<-read.dta(‘wvs6.dta’, convert.factors=F)
Tasks:
1) For the entire assignment, you will work with only a subset of the data. Select the
country according to your date of birth, following the table at the end of this
document. Example: if you were born on the 17th of the month, subset the data to
include only respondents from Kazakhstan, following the country codes in variable
V2.
2) Provide descriptive statistics for basic demographic characteristics of this sample.
For example (but not necessarily) in terms of levels of education, male/female ratio,
or age.
3) Pick any continuous (numerical) variable in which you are interested. This will be
your dependent variable for the rest of the assignment.
a) What are its mean, median, and standard deviation?
b) How is it distributed? Is it close to normal?
c) Select a binary variable that divides respondents into two groups and run a
two-samples t-test, where the DV is the continuous variable you were just
working with. Is there a significant difference between the two groups? Give a
quick substantive (social scientific) interpretation in 2-3 sentences.
d) Produce a graph to convey this result (options include, but are not limited to,
a density plot or a bar plot).
4) Now select another continuous variable you might be interested. How much does it
correlate with the previous? Is there a reasonable theoretical explanation for the
correlation (or lack thereof)? Show their correlation with a scatterplot that contains
also a linear regression line between the two and 95% confidence intervals.
5) Now, build a regression model to explain that continuous dependent variable. Include
as independent variables the binary variable used in question 3, the continuous
variable used in question 4, and any other controls that may be relevant. In one
paragraph, interpret the results.
Table for countries:
Birthday Country Birthday Country
1 Taiwan 17 Kazakhstan
2 Algeria 18 Jordan
3 Colombia 19 Brazil
4 Ecuador 20 South Korea
5 Azerbaijan 21 Kuwait
6 Argentina 22 Kyrgyztan
7 Australia 23 Lebanon
8 Estonia 24 Belarus
9 Bahrain 25 Libya
10 Palestine 26 Malaysia
11 Armenia 27 Mexico
12 Germany 28 Morocco
13 Hong Kong 29 Netherlands
14 India 30 Chile
15 Iraq 31 China
16 Japan
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。