Hi there, welcome. This website supplies the supplementary materials for EDMS 657-Exploratory Latent and Composite Variable Methods, taught by Dr. Gregory R. Hancock at University of Maryland, College Park.

In class, you have been introduced to a variety of exploratory analyses methods and gained a good knowledge about how to conduct exploratory data analyses using SPSS. Although SPSS is a useful tool, it is certainly not the only option for exploratory data analyses. Here we are going to demonstrate how to apply the exploratory analytical methods covered in class using the open source software RStudio.

If you are a beginner with R, please download and install RStudio, which can be accessed for free here. To get you started with R, here are some useful resources:

  1. Heo, Veen, & Van de Schoot (2020) has a very nice online tutorial for R beginners.
  2. R for Data Science written by Garrett Grolemund and Hadley Wickham.
  3. R style guide.
  4. The official manual of R.

On this website, you will also find interactive exercises that will give you a gentle introduction to using R for exploratory data analyses.

The tutorials supplied here are based on the examples and exercises you have already seen in class, where you have practiced with SPSS. We are going to utilize different R packages to complete similar tasks. Please note that SPSS and R may not always yield exactly the same results.


Some Tips Before We Start

Before we get started, please make sure you have installed R or RStudio on your device. You could install the latest version of RStudio or R.

In the tutorials, we are going to utilize different R packages for a variety of tasks. R packages are collections of R functions and/or data files. To use the functions in a R package, you will need to install the package locally and load the package before calling up the functions.

install.packages("package name")
library("package name")

For the R tutorials and exercises, we will need to install the EDMS657Data R package to access the collection of data files.

install.packages("devtools")
library(devtools)
install_github("YiFengEDMS/EDMS657Data")
library(EDMS657Data)

It is also important to make sure you have correctly set up your working directory to where your data are stored. To see your current working directory:

getwd()

To change your working directory, you can either use the setwd() function, or click the “Session –> Set Working Directory” button in the menu.

mypath <- "/EDMS657-tutorials/EDMS657-R-Tutorials"
setwd(mypath)

Topics

  1. Introduction
  1. Multivariate analysis of variance
  1. Principal Components Analysis
  1. Exploratory Factor Analysis
  1. EFA with Categorical Data
  1. Cluster Analysis
  1. Mixture Models
  1. Latent Class Analysis
  1. Tree-based Methods

© Copyright 2022 Yi Feng and Gregory R. Hancock.