Bishwajit Ghose

Course outline

Getting started with R, R studio, and R Studio cloud.

Inroduction to the alternative GUIs: 

  • Rcmdr
  • Jamovi
  • JGR 
  • Deducer
  • Blusky


Basic operations

  • Connecting to a working directory.
  • Customising the interface.
  • Understading the basic operators
  • Data types (integer, double, logical, character )
  • Loading and using example dataframes
  • Creating toy datasets
  • Reading comma-separated values (CSV) files, tab-separated values (TSV) files, fixed-width files. 
  • Importing datasets.

Using packages
  • Installation
  • Loading
  • Installing and loading several packages simultaneously
  • Unload packages without restarting R
  • Dealing with conflicting packages

Learning the essential R packages
  • rio (R input Output)
  • dplyr (dataframes pliers)
  • psych (Procedures for Psychological, Psychometric, and Personality Research)
  • lavaan (latent variable analysis)
  • extensible markup language (XML)
  • caret (classification & regression training)
  • stargazer (exporting regression and summary tables)
  • car (companion to applied regression)
  • rms (regression modeling strategies)
  • sgm (stochastic gradient methods)
  • ggplot (grammar of graphics)

Data wrangling

  • Handling missings and outliers (imputation)
  • Renaming columns
  • Recoding columns
  • dplyr functions (filter, distinct, slice, arrange, select, pull, mutate)
  • Join types (inner join, left join, right join, full join, semi join, anti join)

Dataframe functions

  • Using tibbles and data.table
  • Reshaping (long to wide, wide to long)
  • Subsetting and merging dataframes (rbind, cbind)
  • Subsetting by column types (string/ factor)
  • Transposing rows and columns
  • Merging rows and columns

Basic summary Statistics with visualization
  • Bar Graph
  • Pie Chart
  • Histograms
  • Boxplots


Summary tables

  • Reporting basic statistics with Hmisc and psych
  • Reporting prcentages with tabyl  (janitor)
  • Summarising continuous vars with epidisplay 
  • Cross-tabs of categorical cars with gmodels


Regression analysis

  • Finding the best predictors (leap, glmulti)
  • Linear regression (Simple vs Multiple vs Polynomial)
  • Generalized Linear Model
  • Multinomial logistic regression
  • Generalized estimating equations
  • Regression for categorical response variables 
  • Variable importance analysis
  • Model diagnostics
  • Regression plots (Forest plot)
  • SEM and path analysis with lavaan

Making reports with R
  • R Markdown