SEMinR Lecture Series - Analyzing Categorical Predictors

SEMinR Lecture Series - Categorical Predictor variables

SEMinR Lecture Series

This session is focused on how to perform moderation analysis using SEMinR in Cran R.

Categorical Predictor Variables using SEMinR in R

  • The objective is to assess whether Country has an impact on Customer Loyalty.
  • Country is a categorical variable in the study with three countries China, Pakistan, and Italy.
  • Country is not added into the model directly. Since, it is a categorical variable, first the variable is dummy coded. Each Country will become a separate variable.
  • In this case Two categories (Countries) will be added in the model estimation. Whereas the third country will serve as a reference category.

Create Dummy Variables in R

  • Dummy variables are created when the exogenous variable is categorical in nature.
  • Each category is transformed into a dummy variable.
  • To create dummy variables in R, install fastDummies package

Video Tutorial

Complete Code

Reference

Hair Jr, J. F., Hult, G. T. M., Ringle, C. M., Sarstedt, M., Danks, N. P., & Ray, S. (2021). Partial Least Squares Structural Equation Modeling (PLS-SEM) Using R: A Workbook.

Partial Least Squares Structural Equation Modeling (PLS-SEM) Using R

The tutorials on SEMinR are based on the mentioned book. The book is open source and available for download under this link.

Download PDF