Using R for Data Analysis in Social Sciences
Latest Publications


TOTAL DOCUMENTS

8
(FIVE YEARS 0)

H-INDEX

0
(FIVE YEARS 0)

Published By Oxford University Press

9780190656218, 9780190656256

Author(s):  
Quan Li

This chapter provides a brief introduction to two techniques often used with discrete data: testing statistical independence between two discrete variables with Chi-squared statistics, and testing the effects of some independent variables on the probability of a dependent variable taking on the value of one rather than zero with logistic regression. Both are illustrated by focusing on a dichotomous variable measuring self-reported happiness by survey respondents in World Value Surveys. In addition, the chapter also provides a short list of publicly available data resources that help to familiarize readers with the wealth of data in the public domain.


Author(s):  
Quan Li

This chapter teaches how to use R to conduct regression analysis to answer the question: Does trade promote economic growth? It demonstrates how to specify a statistical model from a theoretical argument, prepare data, estimate and interpret the statistical model, and use the estimated results to make inferences and answer the question of interest. More specifically, it discusses the logic of regression analysis, the relationship between population and sample regression models, how to estimate a regression model in theory and practice, the estimation of sample regression model using OLS (ordinary least squares), the interpretation of estimation results, the statistical inference in regression analysis using hypothesis testing and confidence interval, the types of sum of squares and overall model fit, and how to report the model results. The validity of regression analysis is contingent upon the assumptions of the Gauss-Markov theorem being met.


Author(s):  
Quan Li

This chapter demonstrates how to replicate the statistical findings in two published articles from international relations and economics, respectively. The purpose of these replication exercises is to accumulate first-hand experience in conducting social science empirical research. One study involves the research question: What influences the geographic spread of military conflict, one dependent variable, and a couple of regression models? The other study also involves one research question: Does religiosity influence individual attitudes toward innovation but many dependent and independent variables and numerous regression models? Both styles of empirical research are common in applied work.


Author(s):  
Quan Li

This chapter shows why the Gauss-Markov assumptions are important in ordinary least squares (OLS) regression, how to diagnose assumption violations in OLS regression, and how to conduct sensitivity analysis and correct for some assumption violations. The issues covered include linearity and model specification, perfect and high multicollinearity, constant error variance, independence of error term observations, outlier and influential observations, and normality test. A mastery of materials in this chapter is necessary for systematic data analysis of a continuous outcome variable in a cross-sectional design


Author(s):  
Quan Li

This chapter begins with the substantive question of whether trade openness and economic growth are correlated, which motivates both data preparation and statistical analysis. The chapter first illustrates how to get data ready and then demonstrates how to visualize the relationship between two variables using scatter plot. The chapter shows how to use covariance and correlation coefficient to test whether trade openness and economic growth are correlated in the population and to estimate the strength of their correlation. Like in the previous chapter, null hypothesis testing and confidence interval are used for statistical inference. The chapter then demonstrates how to derive and test the sample correlation for each year during the sample period. The problems with the correlation coefficient are that it does not control for other confounding factors of economic growth and that it does not identify the marginal effect of trade on growth.


Author(s):  
Quan Li

This chapter demonstrates the types of questions one could ask about a continuous random variable of interest and answer using statistical inference. It provides conceptual preparation for understanding statistical inference, demonstrates how to get data ready for analysis in R, and then illustrates how to conduct two types of statistical inferences—null hypothesis testing and confidence interval construction—regarding the population attributes of a continuous random variable, using sample data. Both the one-sample t-test and the difference-of-means test are presented. Two key points in this chapter are worth noting. First, statistical inference is primarily concerned about figuring out population attributes using sample data. Hence, it is not the same as causal inference. Second, statistical inference can help to answer various questions of substantive interest. This chapter focuses on statistical inferences regarding one continuous random outcome variable.


Author(s):  
Quan Li
Keyword(s):  

This chapter shows how to read an original raw dataset Penn World Table 7.0 in the comma-delimited format into R, how to create a corresponding data object, how to inspect the imported data visually, how to obtain information on dataset attributes (dimensions, variable names, etc.), how to graph select variables, and how to manage variables, observations, and datasets in order to get data ready for analysis. The chapter also shows how to import datasets of different formats into R and other miscellaneous programming information. Chapter 2 covers a large amount of materials that are necessary for getting data ready for analysis, even at the beginner’s level


Author(s):  
Quan Li

This first chapter provides an overview of the steps for completing a research project, offers a one-paragraph introduction to R, shows how to install R and its add-on packages, mentions how to get help, presents an example of how to write and execute a simple R program as an ice-breaker, demonstrates how to create, describe, and graph a variable in R with a simple numerical example, illustrates how to report descriptive statistics in a table, and concludes by applying the R code to a real-world data example from a published article. The chapter also shows common coding errors and a variety of logical and mathematical operators, how to use R on Mac machines, how to export output from R, and how to install and use RStudio.


Sign in / Sign up

Export Citation Format

Share Document