Print, Export, and Plot PLS Results in SEMinR

SEMinR Lecture Series Print, Export, and Plot Results

Learn to Print, Export, and Plot PLS Results

This series of lecture on SEMinR Package will introduce the SEMinR package.

SEMinR

There are four steps to specify and estimate a structural equation model using SEMinR:

  • Loading and cleaning the data
  • Specifying the measurement models
  • Specifying the structural model
  • Estimating, bootstrapping, and summarizing the model

Review of the Steps

  • When model estimation, evaluation, and analysis have been completed, it is often necessary to export the results generated in R to a report. It is recommended that tables and matrices are exported to .csv files.
  • The write.csv() function takes an object and writes it into a .csv file in the working directory of the project.
  • This function applies two arguments: x is the name of the object to be written to file, and file is the name of the file to be created and written to.
  • Thus, if we wish to report the bootstrapped paths from the previously discussed simple model, we would use the write.csv() function with argument x = summary_boot$bootstrapped_loadings and file = “boot_loadings.csv”.

Plots

  • When plotting the results, use plot() function as shown in the figure below with command plot (summary_simple$reliability) to extract the reliability plot.
  • Next, we discuss how to generate high-quality figures from the SEMinR results.
  • First, we generate a sample plot for export from RStudio. To do this, we use a sub-object of summary_simple and plot the constructs’ internal consistency reliabilities (i.e., Cronbach’s alpha, rhoA, and rhoC) with

plot(summary_simple$reliability)

  • Once this plot displays in the plots tab in RStudio (Fig), click the Export dropdown list and select Save as PDF to bring up the save plot as a .pdf window. Select the size and output name and save the document.

Measurement and Structural Model in SEMinR

  • When plotting the results, use plot() function as shown in the figure below.

  • In simple terms in the plot function provide, simple_model or boot_model as arguments. Both are the estimated models. simple_model is the estimated pls model whereas boot_model is the bootstrapped model.

Review of the Steps

Following is a brief review of the steps that have been discussed in SEMinR tutorials. 

  • Load the Library – library ()
  • Load the Data – read.csv
  • Review the Data – head()
  • Specify the Measurement Model – constructs()
  • Specify the Structural Model – relationships()
  • Estimate the Model – estimate_pls()
  • Summarize the Results – summary()
  • Bootstrap the Model – bootstrap_model()
  • Summarize the Results – summary()

The next step is Plotting and Writing Results – plot() and Write.csv

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.

 

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

Download PDF

Video Tutorial