R Scripts

    R Tutorial

    Introduction to R.
    Basic R commands; an introduction on how to produce professional figures with the package "ggplot2"; how to save/export your figure to .pdf and .png extensions, and; how to conduct a simple linear regression in R.

    Getting Data Into R.
    How to load (import) and save (export) different data sets (with different extensions: .txt; .csv; .xls; .xlsx; .dta; .sav) into R.

    Descriptive Statistics and Graphical Representation of the Distribution of Data.
    Obtaining summary and descriptive statistics; export tables with these statistics to LaTeX; how to produce professional graphs using the package ggplot2; how to combine graphs in the same figure, and; how to create a function in R.

    Data Simulation in R.
    Introduction to data simulation, and; simulating data to show how the Central Limit Theorem works.

    Covariance and Correlation.
    How to compute and produce graphs for covariance and correlation between variables.

    OLS Estimator and its Properties.
    Bivariate and multivariate regression models; how to calculate properties of the ordinary least square (OLS) estimators using simulated and real data, and; how to convert R statistical model outputs into LaTeX code.

    Multiplicative Interaction Models.
    How to conduct multiplicative interaction regression models and plot the conditional effects of the interactive terms; how to rename and recode variables (e.g., continuous and dichotomous variables) to make the data more appropriate and valuable for analysis.


Web scraping: Extracting data from websites