**Classroom Companion: Business**

Joseph F. Hair Jr. · G. Tomas M. Hult · Christian M. Ringle · Marko Sarstedt · Nicholas P. Danks · Soumya Ray

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

A Workbook

Classroom Companion: Business

The Classroom Companion series in Business features foundational and introductory books aimed at students to learn the core concepts, fundamental methods, theories and tools of the subject. The books offer a frm foundation for students preparing to move towards advanced learning. Each book follows a clear didactic structure and presents easy adoption opportunities for lecturers.

More information about this series at http://www.springer.com/series/16374

Joseph F. Hair Jr. • G. Tomas M. Hult Christian M. Ringle • Marko Sarstedt Nicholas P. Danks • Soumya Ray

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

A Workbook

Joseph F. Hair Jr. Mitchell College of Business University of South Alabama Mobile, AL USA

Christian M. Ringle Department of Management Science and Technology Hamburg University of Technology Hamburg, Germany

Nicholas P. Danks Trinity Business School Trinity College Dublin, Ireland

G. Tomas M. Hult Broad College of Business Michigan State University East Lansing, MI USA

Marko Sarstedt Otto-von-Guericke University Magdeburg Magdeburg, Germany

Babeş-Bolyai University Faculty of Economics and Business Administration Cluj, Romania

Soumya Ray National Tsing Hua University Hsinchu, Taiwan

This book is an open access publication.

ISSN 2662-2866 ISSN 2662-2874 (electronic) Classroom Companion: Business ISBN 978-3-030-80518-0 ISBN 978-3-030-80519-7 (eBook) https://doi.org/10.1007/978-3-030-80519-7

© The Editor(s) (if applicable) and The Author(s) 2021

**Open Access** This book is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this book are included in the book's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the book's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specifc statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.

The publisher, the authors, and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affliations.

This Springer imprint is published by the registered company Springer Nature Switzerland AG The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland

### **Preface**

In 2021, the third edition of our introductory book *A Primer on Partial Least Squares Structural Equation Modeling (PLS-SEM)* was published (Hair, Hult, Ringle, & Sarstedt, 2022). The book covers the latest developments in the feld, including recent advances in model evaluation (e.g., inference testing in discriminant validity assessment, predictive power assessments using PLSpredict, and model comparisons), improved guidelines for minimum sample sizes, and new complementary methods and concepts such as necessary condition analysis and endogeneity. The book has been highly successful as evidenced in its citation count of more than 24,000 times according to Google Scholar (as of August 2021), and the translations into seven other languages, including in German (Hair et al., 2017), Italian (Hair et al., 2020), and Spanish (Hair et al., 2019). One of the book's features that has likely contributed to its popularity is our strong focus on pedagogical elements, most notably our reliance on a single running case study and the commercial SmartPLS 3 software (Ringle, Wende, & Becker, 2015), which stands out due to its frictionless design, allowing novice researchers to quickly specify and estimate PLS path models (Memon et al., 2021; Sarstedt & Cheah, 2019).

While SmartPLS constitutes the most frequently used software to conduct PLS-SEM analyses (Ghasemy, Teeroovengadum, Becker, & Ringle, 2020; Hair, Hollingsworth, Randolph, & Chong. 2017; Usakli & Kucukergin 2018), research has brought forward several packages for the R environment such as csem (Rademaker et al., 2020), SEMinR (Ray et al., 2021), and semPLS (Monecke & Leisch, 2012; Monecke & Leisch, 2013), whose use has recently gained traction. Among the R packages available on CRAN, Ray et al.'s (2021) SEMinR package brings a particularly friendly syntax to creating and estimating structural equation models using functions named appropriately for the facets of PLS path models that applied researchers are familiar with: "multi-item" versus "single-item," "constructs," "paths," and so on. The package also gives users intuitive functions for generating higher-order constructs and interaction terms, the fexibility to quickly implement and insert their own extensions such as missing data imputation methods or visualizations, and generate reports and fgures for research output. It was logical, therefore, to prepare a version of the book that shares the methodological concepts and also features the R software as a method for estimating PLS path models. This book caters this aim.

We designed the text as a workbook for readers who have already been exposed to PLS-SEM by reading textbooks (e.g., Hair et al., 2022; Henseler, 2021; Ramayah, Cheah, Chuah, Ting, & Memon, 2016; Mehmetoglu & Venturini, 2021; Wong, 2019) or seminal articles (e.g., Chin, 1998; Hair, Ringle, & Sarstedt, 2011; Hair, Risher, Ringle, & Sarstedt, 2019; Henseler, Ringle, & Sinkovics, 2009; Sarstedt, Ringle, & Hair, 2022; Tenenhaus, Esposito Vinzi, Chatelin, & Lauro, 2005) on the method. Nevertheless, to enable readers with little background in PLS-SEM to quickly grasp the concepts, each chapter offers a concise overview of relevant topics and metrics relevant for executing PLS-SEM and interpreting the results. Accompanied by a rich set of references for further reading, rules of thumb in every chapter provide guidelines on best practices in the application of PLS-SEM. The focus, however, is on the in-depth description of the case study, which gives readers the "how-tos" of using SEMinR to obtain solutions and to report their results. Correspondingly, the workbook puts less emphasis on aspects related to model design and measurement model specifcation but, instead, introduces the R environment and particularly the SEMinR package in detail.

Nevertheless, the workbook incorporates many of the new features that have been introduced in the third edition of the *Primer on Partial Least Squares Structural Equation Modeling (PLS-SEM)* (Hair et al., 2022) and offers unique contents tailored to the SEMinR package. These include the following:

All examples in the edition apply to the newest version of the SEMinR package, which is available free of charge in CRAN (7 https://CRAN.R-project.org/ package=seminr; see also 7 Chap. 3). The book chapters and learning support supplements are organized around the learning outcomes shown at the beginning of each chapter. Moreover, each chapter includes a single concise summary for the learning outcomes. The website 7 https://www.pls-sem.com includes a series of support materials to facilitate learning and applying the PLS-SEM method and using the SEMinR package.

Visit 7 https://www.pls-sem.com for access to R markdown documents, which weave together descriptions and code that can be easily copied into the R console.

Additionally, the PLS-SEM Academy (7 https://www.pls-sem-academy.com) offers video-based online courses based on this book. The courses include basic contents such as model specifcation and evaluation as well as advanced topics, including mediation, higher-order constructs, moderation, measurement invariance, multigroup analysis, and nonlinear effects.

Besides several hours of online video material presented by world-renowned instructors, the PLS-SEM Academy provides comprehensive lecturing slides that illustrate all analyses step-by-step. While the case study descriptions draw on the SmartPLS software, the concepts are fully applicable to the R software-based analyses using the SEMinR package. Registered users can claim course certifcates after successful completion of each end of section exam.

#### **Discounted PLS-SEM Academy Access**

The PLS-SEM Academy offers all owners of this book a 15% discount on the purchase of access to its course offerings.  A short time later you will receive a 15% discount code which you can use on the website 7 https://www.pls-sem-academy.com. We hope you enjoy perfecting your PLS-SEM skills with the help of these courses and wish you every success in obtaining the certifcates.

We would like to acknowledge the many insights and suggestions provided by the colleagues, students, and PLS-SEM users worldwide. Most notably, we thank Nicole Beachum (University of Alabama, Birmingham), Jan-Michael Becker (BI Norwegian Business School), Zakariya Belkhamza (Ahmed Bin Mohammed Military College), Charla Brown (Troy University), Roger Calantone (Michigan State University), Fabio Cassia (University of Verona), Gabriel Cepeda Carrión (University of Seville), Jacky Jun Hwa Cheah (Universiti Putra Malaysia), Adamantios Diamantopoulos (University of Vienna), Markus Eberl (Kantar), George Franke (University of Alabama), Anne Gottfried (University of Texas, Arlington), Siegfried P. Gudergan (University of Waikato), Saurabh Gupta (Kennesaw State University), Karl-Werner Hansmann (University of Hamburg), Dana Harrison (East Tennessee State University), Sven Hauff (Helmut Schmidt University), Mike Hollingsworth (Old Dominion University), Philip Holmes (Pensacola Christian College), Chris Hopkins (Auburn University), Lucas Hopkins (Florida State University), Maxwell K. Hsu (University of Wisconsin), Heungsun Hwang (McGill University), Ida Rosnita Ismail (Universiti Kebangsaan Malaysia), April Kemp (Southeastern Louisiana University), David Ketchen (Auburn University), Ned Kock (Texas A&M University), Marcel Lichters (TU Chemnitz), Benjamin Liengaard (Aarhus University), Chein-Hsin Lin (Da-Yeh University), Yide Liu (Macau University of Science and Technology), Francesca Magno (University of Bergamo), Lucy Matthews (Middle Tennessee State University), Jay Memmott (University of South Dakota), Mumtaz Ali Memon (NUST Business School), Adam Merkle (University of South Alabama), Ovidiu I. Moisescu (Babeş-Bolyai University), Zach Moore (University of Louisiana at Monroe), Arthur Money (Henley Business School), Christian Nitzl (Universität der Bundeswehr München), Torsten Pieper (University of North Carolina), Dorian Proksch (University of Twente), Lacramioara Radomir (Babeş-Bolyai University), Arun Rai (Georgia State University), Sascha Raithel (Freie Universität Berlin), S. Mostafa Rasoolimanesh (Taylor's University), Lauren Rich (University of West Florida), Nicole Richter (University of Southern Denmark), Edward E. Rigdon (Georgia State University), Jeff Risher (Southeastern Oklahoma University), José Luis Roldán (University of Seville), Amit Saini (University of Nebraska-Lincoln), Phillip Samouel (University of Kingston), Francesco Scafarto (University of Rome "Tor Vergata"), Bruno Schivinski (University of London), Rainer Schlittgen (University of Hamburg), Manfred Schwaiger (Ludwig-Maximillians University), Pratyush N. Sharma (University of Alabama), Wen-Lung Shiau (Zhejiang University of Technology), Galit Shmueli (National Tsing Hua University), Donna Smith (Ryerson University), Toni M. Somers (Wayne State University), Detmar W. Straub (Georgia State University), Ramayah Thurasamy (Universiti Sains Malaysia), Hiram Ting (UCSI University), Ron Tsang (Agnes Scott College), Huiwen Wang (Beihang University), Sven Wende (SmartPLS GmbH), Anita Whiting (Clayton State University), David Williams (Dalton State University), and Lea Witta (University of Central Florida) for their helpful remarks.

Also, we thank the team of doctoral student and research fellows at Hamburg University of Technology and Otto-von-Guericke University Magdeburg namely, Michael Canty, Svenja Damberg, Lena Frömbling, Frauke Kühn, Benjamin Maas, Mandy Pick, and Martina Schöniger—for their kind support. In particular, we would like to thank Susanne Adler who translated the book contents into R markdown documents, available on 7 https://www.pls-sem.net. In addition, at Springer we thank Ruth Milewski and Prashanth Mahagaonkar for their support and great work. We hope the R software version of our book will expand knowledge of the capabilities and benefts of PLS-SEM to a much broader group of researchers and practitioners. Lastly, if you have any remarks, suggestions, or ideas to improve this book, please get in touch with us. We appreciate any feedback on the book's concept and contents!

Visit the companion site for this book at 7 https://www.pls-sem.com.

**Joseph F. Hair Jr.** Mobile, AL, USA

**G. Tomas M. Hult** East Lansing, MI, USA

**Christian M. Ringle** Hamburg, Germany

**Marko Sarstedt** Magdeburg, Germany

**Nicholas P. Danks** Dublin, Ireland

**Soumya Ray** Hsinchu, Taiwan

#### **References**

### **Contents**

### **About the Authors**

#### **Joseph F. Hair Jr.**

is Cleverdon Chair of Business, and director of the PhD degree in business administration, Mitchell College of Business, University of South Alabama. He previously held the Copeland Endowed Chair of Entrepreneurship and was director of the Entrepreneurship Institute, Ourso College of Business Administration, Louisiana State University. Joe was recognized by Clarivate Analytics in 2018, 2019, and 2020 for being in the top 1% globally of all business and economics professors based on his citations and scholarly accomplishments, which exceed 251,000 over his career. Professor Hair has authored more than 75 books, including *Multivariate Data Analysis (8th edition, 2019; cited 150,000+ times), MKTG (13*th *edition, 2020), Essentials of Business Research Methods (2020)* and *Essentials of Marketing Research* (4th edition, 2020). He also has published numerous articles in scholarly journals and was recognized as the *Academy of Marketing Science Marketing Educator of the Year*. As a popular guest speaker, Professor Hair often presents seminars on research techniques, multivariate data analysis, and marketing issues for organizations in Europe, Australia, China, India, and South America. He has a new book on *Essentials of Marketing Analytics*, 2021 (McGraw-Hill).

#### **G. Tomas M. Hult**

is professor and Byington Endowed Chair at Michigan State University (USA), and holds a visiting chaired professorship at Leeds University Business School (United Kingdom) and a visiting professorship at Uppsala University (Sweden). Professor Hult is a member of the Expert Networks of the World Economic Forum and United Nations/UNCTAD's World Investment Forum and is also part of the Expert Team at the American Customer Satisfaction Index (ACSI). Professor Hult was recognized in 2016 as the *Academy of Marketing Science/CUTCO-Vector Distinguished Marketing Educator*; he is an elected fellow of the Academy of International Business; and he ranks in the top-10 scholars in marketing per the prestigious *World Ranking of Scientists*. At Michigan State University, Professor Hult was recognized with the Beal Outstanding Faculty Award in 2019 (MSU's highest award "for outstanding total service to the University"), and he has also been recognized with the John Dunning AIB Service Award for outstanding service to AIB as the longest serving executive director in AIB's history (2004–2019) (the most prestigious service award given by the Academy of International Business). Professor Hult regularly teaches doctoral seminars on multivariate statistics, structural equation modeling, and hierarchical linear modeling worldwide. He is a dual citizen of Sweden and the United States. More information about Professor Hult can be found at 7 http://www.tomashult.com.

#### **Christian M. Ringle**

is a chaired professor of management at the Hamburg University of Technology (Germany). His research addresses management of organizations, human resource management, and methods development for business analytics and their application to business research. His contributions in these felds have been published in journals such as *International Journal of Research in Marketing, Information Systems Research, Journal of the Academy of Marketing Science, MIS Quarterly, Organizational Research Methods,* and *The International Journal of Human Resource Management*. Since 2018, he has been named member of Clarivate Analytics' Highly Cited Researchers List. In 2014, Professor Ringle co-founded SmartPLS (7 https://www. smartpls.com), a software tool with a graphical user interface for the application of the partial least squares structural equation modeling (PLS-SEM) method. Besides supporting consultancies and international corporations, he regularly teaches doctoral seminars on business analytics, machine learning methods, multivariate statistics, the PLS-SEM method, and the use of SmartPLS worldwide. More information about Professor Christian M. Ringle can be found at 7 https://www.tuhh.de/hrmo/team/prof-dr-c-m-ringle.html.

#### **Marko Sarstedt**

is a chaired professor of marketing at the Ludwig-Maximilians-University Munich (Germany) and an adjunct professor at Babeş-Bolyai University, Romania. His main research interest is the advancement of research methods to enhance the understanding of consumer behavior. His research has been published in *Nature Human Behavior*, *Journal of Marketing Research*, *Journal of the Academy of Marketing Science*, *Multivariate Behavioral Research*, *Organizational Research Methods*, *MIS Quarterly*, and *Psychometrika*, among others. His research ranks among the most frequently cited in the social sciences. Professor Sarstedt has won numerous best paper and citation awards*,* including fve *Emerald Citations of Excellence Awards* and two *AMS William R. Darden Awards.* According to the 2020 F.A.Z. ranking, he is among the most infuential researcher in Germany, Austria, and Switzerland. Professor Sarstedt has been named member of Clarivate Analytics' Highly Cited Researchers List, which includes the "world's most impactful scientifc researchers."

#### **Nicholas P. Danks**

is an assistant professor of business analytics at Trinity College, Dublin. His research focuses on structural equation modeling, partial least squares, predictive methodology, and programming. Nicholas is a co-author and the primary maintainer of SEMinR, an open-source package for the R Statistical Environment for the estimation and evaluation of structural equation models. He received a William R. Darden Best Marketing Research Paper Award at the conference of the Academy of Marketing Science. His research has been published in the Human Resource Management Journal, *Journal of Business Research*, and *Decision Sciences*.

#### **Soumya Ray**

Soumya Ray is an associate professor at the Institute of Service Science at National Tsing Hua University. He is the co-creator of the SEMinR package for structural equation modeling for the R platform. His research interests include online user behavior and applied methods, and his work has been published in *Information Systems Research*, *Journal of Management Information Systems*, *Decisions Sciences*, and others. His teaching and development interests include systems architecture, information security, and computational statistics.

# **An Introduction to Structural Equation Modeling**

#### **Contents**

1

**References – 24**

#### **Learning Objectives**

After reading this chapter, you should:

#### **1.1 What Is Structural Equation Modeling?**

First-generation multivariate data analysis techniques, such as multiple regression, logistic regression, and analysis of variance, belong to the core set of statistical methods employed by researchers to empirically test hypothesized relationships between variables of interest. Numerous researchers in various scientifc disciplines have applied these methods to generate fndings that have signifcantly shaped the way we see the world today. These techniques have three important limitations in common, namely (1) the postulation of a simple model structure, (2) requiring that all variables can be considered observable, and (3) the assumption that all variables are measured without error (Haenlein & Kaplan, 2004).

With regard to the frst limitation, multiple regression analysis and its extensions postulate a simple model structure involving one layer of dependent and independent variables. Causal chains, such as "A leads to B leads to C" or more complex nomological networks involving a large number of intervening variables, can only be estimated piecewise with these methods rather than simultaneously, which can have severe consequences for the quality of the results (Sarstedt, Hair, Nitzl, Ringle, & Howard, 2020).

With regard to the second limitation, regression-type methods are restricted to processing observable variables, such as age or sales (in units or dollars). Theoretical concepts, which are "abstract, unobservable properties or attributes of a social unit of entity" (Bagozzi & Philipps, 1982, p. 465), can only be considered after prior stand-alone validation by means of, for example, a confrmatory factor analysis (CFA). The ex post inclusion of measures of theoretical concepts, however, comes with various shortcomings.

With regard to the third limitation and related to the previous point, one has to bear in mind that each observation of the real world is accompanied by a certain degree of **measurement error**, which can be systematic or random. First-generation techniques are, strictly speaking, only applicable when measured variables contain neither systematic nor random error. This situation is, however, rarely encountered in reality, particularly when the aim is to estimate relationships among measures of theoretical concepts. Since the social sciences, and many other felds of scientifc inquiry, routinely deal with theoretical concepts, such as perceptions, attitudes, and intentions, these limitations of frst-generation techniques are fundamental.

**<sup>1</sup>** To overcome these limitations, researchers have increasingly been turning to **second-generation techniques**. These methods, referred to as **structural equation modeling (SEM),** enable researchers to simultaneously model and estimate complex relationships among multiple dependent and independent variables. The concepts under consideration are typically unobservable and measured indirectly by multiple indicators. In estimating the relationships, SEM accounts for measurement error in observed variables. As a result, the method obtains a more precise measurement of the theoretical concepts of interest (Cole & Preacher, 2014). We will discuss these aspects in the following sections in greater detail.

Two popular methods dominate SEM in practice: **covariance-based SEM (CB-SEM)** and **partial least squares SEM** (**PLS-SEM**, also called **PLS path modeling**). CB-SEM is primarily used to confrm (or reject) theories and their underlying hypotheses. This approach confrms/rejects hypotheses by determining how closely a proposed theoretical model can reproduce the covariance matrix for an observed **sample** dataset. In contrast, PLS has been introduced as a "causal–predictive" approach to SEM (Jöreskog & Wold, 1982, p. 270), which focuses on explaining the variance in the model's dependent variables (Chin et al., 2020).

PLS-SEM is evolving rapidly as a statistical modeling technique. Over the last few decades, there have been numerous introductory articles on this methodology (e.g., Chin, 1998; Haenlein & Kaplan, 2004; Hair et al., 2020; Hair, Howard, & Nitzl, 2020; Hair, Risher, Sarstedt, & Ringle, 2019; Nitzl & Chin, 2017; Rigdon, 2013; Roldán & Sánchez-Franco, 2012; Tenenhaus, Esposito Vinzi, Chatelin, & Lauro, 2005; Wold, 1985) as well as review articles examining how researchers across different disciplines have used the method (. Table 1.1). In light of the increasing maturation of the feld, researchers have also started exploring the knowledge infrastructure of methodological research on PLS-SEM by analyzing the structures of authors, countries, and co-citation networks (Hwang, Sarstedt, Cheah, & Ringle, 2020; Khan et al., 2019).

The remainder of this chapter frst provides a brief introduction of measurement and structural theory as a basis for presenting the PLS-SEM method. In describing the PLS-SEM method's characteristics, we also discuss distinguishing features vis-à-vis CB-SEM. Finally, we outline considerations when using PLS-SEM and highlight situations that favor its use compared to CB-SEM.

#### **1.2 Principles of Structural Equation Modeling**

#### **1.2.1 Path Models with Latent Variables**

**Path models** are diagrams used to visually display the hypotheses and variable relationships that are examined when SEM is applied (Hair, Page, & Brunsveld, 2020; Hair, Ringle, & Sarstedt, 2011). An example of a path model is shown in . Fig. 1.1.

**Constructs** (i.e., variables that are not directly measurable), also referred to as **latent variables**, are represented in path models as circles or ovals (*Y*<sup>1</sup> to *Y*<sup>4</sup> ). The **indicators**, also called items or manifest variables, are the directly measured vari-

..      **Table 1.1** Review articles on the use of PLS-SEM

Source: Hair, Hult, Ringle, & Sarstedt (2022), Chap. 1; used with permission by Sage

ables that contain the raw data. They are represented in path models as rectangles (*x*1 to *x*10). Relationships between constructs, as well as between constructs and their assigned indicators, are depicted as arrows. In PLS-SEM, the arrows are always single headed, thus representing directional relationships. Single-headed arrows are considered predictive relationships and, with strong theoretical support, can be interpreted as causal relationships.

A PLS path model consists of two elements. First, there is a **structural model** (also called the **inner model** in the context of PLS-SEM) that links together the constructs (circles or ovals). The structural model also displays the relationships (paths) between the constructs. Second, there are the **measurement models** (also referred to as the **outer models** in PLS-SEM) of the constructs that display the relationships between the constructs and the indicator variables (rectangles). In . Fig. 1.1, there are two types of measurement models: one for the **exogenous**

..      **Fig. 1.1** A simple path model. (Source: Hair et al., 2022, Chap. 1; used with permission by Sage)

**latent variables** (i.e., those constructs that only explain other constructs in the model) and one for the **endogenous latent variables** (i.e., those constructs that are being explained in the model). Rather than referring to measurement models of exogenous and endogenous latent variables, researchers often refer to the measurement model of one specifc latent variable. For example, *x*<sup>1</sup> to *x*<sup>3</sup> are the indicators used in the measurement model of *Y*<sup>1</sup> , while *Y*<sup>4</sup> only includes the *x*10 indicator in the measurement model.

The **error terms** (e.g., *e*<sup>7</sup> or *e*<sup>8</sup> ; . Fig. 1.1) are connected to the (endogenous) constructs and (refectively) measured variables by single-headed arrows. Error terms represent the unexplained variance when path models are estimated (i.e., the difference between the model's in-sample prediction of a value and an observed value of a manifest or latent variable). Error terms *e*<sup>7</sup> to *e*<sup>9</sup> in . Fig. 1.1 are connected to those indicators whose relationships point from the construct (*Y3* ) to the indicators (i.e., refectively measured indicators).

In contrast, the formatively measured indicators *x*<sup>1</sup> to *x*<sup>6</sup> , where the relationship goes from the indicator to the construct (*Y1* and *Y2* ), do not have error terms (Sarstedt, Hair, Ringle, Thiele, & Gudergan, 2016). Finally, for the single-item construct *Y*<sup>4</sup> , the direction of the relationships between the construct and the indicator is not relevant, as construct and item are equivalent. For the same reason, there is no error term connected to *x*10. The structural model also contains error terms. In . Fig. 1.1, *z*<sup>3</sup> and *z*<sup>4</sup> are associated with the endogenous latent variables *Y*<sup>3</sup> and *Y*<sup>4</sup> (note that error terms on constructs and measured variables are labeled differently). In contrast, the exogenous latent variables (*Y1* and *Y2* ) that only explain

**1**

other latent variables in the structural model do not have an error term, regardless of whether they are specifed refectively or formatively.

#### **1.2.2 Testing Theoretical Relationships**

Path models are developed based on theory and are often used to test theoretical relationships. **Theory** is a set of systematically related hypotheses developed following the scientifc method that can be used to explain and predict outcomes. Thus, hypotheses are individual conjectures, whereas theories are multiple hypotheses that are logically linked together and can be tested empirically. Two types of theory are required to develop path models: measurement theory and structural theory. Measurement theory specifes which indicators and how these are used to measure a certain theoretical concept. In contrast, structural theory specifes how the constructs are related to one another in the structural model.

Testing theory using PLS-SEM follows a two-step process (Hair, Black, Babin, & Anderson, 2019). We frst test the measurement theory to confrm the reliability and validity of the measurement models. After the measurement models are confrmed, we move on to testing the structural theory. The logic is that we must frst confrm the measurement theory before testing the structural theory, because structural theory cannot be confrmed if the measures are unreliable or invalid.

#### **1.2.3 Measurement Theory**

**Measurement theory** specifes how the latent variables (constructs) are measured. Generally, there are two different ways to measure unobservable variables. One approach is referred to as refective measurement, and the other is formative measurement. Constructs *Y*<sup>1</sup> and *Y*<sup>2</sup> in . Fig.1.1 are modeled based on a **formative measurement model**. Note that the directional arrows are pointing from the indicator variables (*x*<sup>1</sup> to *x*<sup>3</sup> for *Y*<sup>1</sup> and *x*<sup>4</sup> to *x*<sup>6</sup> for *Y*<sup>2</sup> ) to the construct, indicating a predictive (causal) relationship in that direction.

In contrast, *Y*<sup>3</sup> in . Fig. 1.1 is modeled based on a **refective measurement model**. With refective indicators, the direction of the arrows is from the construct to the indicator variables, indicating the assumption that the construct "causes" the measurement (more precisely, the covariation) of the indicator variables. As indicated in . Fig. 1.1, refective measures have an error term associated with each indicator, which is not the case with formative measures. The latter are assumed to be error-free (Diamantopoulos, 2006). Finally, note that *Y*<sup>4</sup> is measured using a single item rather than multi-item measures. Therefore, the relationship between construct and indicator is undirected.

Deciding whether to measure the constructs refectively versus formatively and whether to use multiple items or a single-item measure is fundamental when developing path models. Hair, Hult, Ringle, and Sarstedt (2022; Chap. 2) explain these approaches to modeling constructs in more detail.

# **<sup>1</sup> 1.2.4 Structural Theory**

**Structural theory** shows how the latent variables are related to one another (i.e., it shows the constructs and their path relationships in the structural model). The location and sequence of the constructs are either based on theory or the researcher's experience and accumulated knowledge or both. When path models are developed, the sequence is from left to right. The variables on the left side of the path model are independent variables, and any variable on the right side is a dependent variable. Moreover, variables on the left are shown as sequentially preceding and predicting the variables on the right. However, when variables are in the middle of the path model (between the variables that serve only as independent or dependent variables – *Y*<sup>3</sup> ; . Fig. 1.1), they serve as both independent and dependent variables in the structural model.

When latent variables only serve as independent variables, they are called exogenous latent variables (*Y*<sup>1</sup> and *Y*<sup>2</sup> ). When latent variables only serve as dependent variables (*Y*<sup>4</sup> ) or as both independent and dependent variables (*Y*<sup>3</sup> ), they are called endogenous latent variables (. Fig. 1.1). Any latent variable that has only singleheaded arrows going out of it is an exogenous latent variable. In contrast, endogenous latent variables can have either single-headed arrows going both into and out of them (*Y*<sup>3</sup> ) or only going into them (*Y*<sup>4</sup> ). Note that the exogenous latent variables *Y*1 and *Y*<sup>2</sup> do not have error terms, since these constructs are the entities (independent variables) that are explaining the dependent variables in the path model.

#### **1.3 PLS-SEM and CB-SEM**

There are two main approaches to estimating the relationships in a structural equation model (Hair et al., 2011; Hair, Black, et al., 2019). One is CB-SEM, and the other is PLS-SEM, the latter being the focus of this book. Each is appropriate for a different research context, and researchers need to understand the differences in order to apply the correct method (Marcoulides & Chin, 2013; Rigdon, Sarstedt, & Ringle, 2017). Finally, some researchers have argued for using regressions based on sum scores, instead of some type of indicator weighting as is done by PLS-SEM. The sum scores approach offers practically no value compared to the PLS-SEM weighted approach and in fact can produce erroneous results (Hair et al., 2017). For this reason, in the following sections, we only briefy discuss sum scores and instead focus on the PLS-SEM and CB-SEM methods.

A crucial conceptual difference between PLS-SEM and CB-SEM relates to the way each method treats the latent variables included in the model. CB-SEM represents a **common factor-based SEM** method that considers the constructs as common factors that explain the covariation between its associated indicators. This approach is consistent with the measurement philosophy underlying refective measurement, in which the indicators and their covariations are regarded as manifestations of the underlying construct. In principle, CB-SEM can also accommodate formative measurement models, even though the method follows a common

8

factor model estimation approach. To estimate this model type, however, researchers must follow rules that require specifc constraints on the model to ensure model identifcation (Bollen & Davies, 2009; Diamantopoulos & Riefer, 2011), which means that the method can calculate estimates for all model parameters. As Hair, Sarstedt, Ringle, and Mena (2012, p. 420) note, "[t]hese constraints often contradict theoretical considerations, and the question arises whether model design should guide theory or vice versa."

PLS-SEM, on the other hand, assumes the concepts of interest can be measured as composites (Jöreskog & Wold, 1982), which is why PLS is considered a **composite-based SEM** method (Hwang et al., 2020). Model estimation in PLS-SEM involves linearly combining the indicators of a measurement model to form composite variables. The composite variables are assumed to be comprehensive representations of the constructs, and, therefore, valid proxies of the conceptual variables being examined (e.g., Hair & Sarstedt, 2019). The composite-based approach is consistent with the measurement philosophy underlying formative measurement, but this does not imply that PLS-SEM is only capable of estimating formatively specifed constructs. The reason is that the estimation perspective (i.e., forming composites to represent conceptual variables) should not be confused with the measurement theory perspective (i.e., specifying measurement models as refective or formative). The way a method like PLS-SEM estimates the model parameters needs to be clearly distinguished from any measurement theoretical considerations on how to operationalize constructs (Sarstedt et al., 2016). Researchers can include refectively and formatively specifed measurement models that PLS-SEM can straightforwardly estimate.

In following a composite-based approach to SEM, PLS relaxes the strong assumption of CB-SEM that all of the covariation between the sets of indicators is explained by a common factor (Henseler et al., 2014; Rigdon, 2012; Rigdon et al., 2014). At the same time, using weighted composites of indicator variables facilitates accounting for measurement error, thus making PLS-SEM superior compared to multiple regression using **sum scores**, where each indicator is weighted equally.

It is important to note that the composites produced by PLS-SEM are not assumed to be identical to the theoretical concepts, which they represent. They are explicitly recognized as approximations (Rigdon, 2012). As a consequence, some scholars view CB-SEM as a more direct and precise method to empirically measure theoretical concepts (e.g., Rönkkö, McIntosh, & Antonakis, 2015), while PLS-SEM provides approximations. Other scholars contend, however, that such a view is quite shortsighted, since common factors derived in CB-SEM are also not necessarily equivalent to the theoretical concepts that are the focus of the research (Rigdon, 2012; Rigdon et al., 2017; Rossiter, 2011; Sarstedt et al., 2016). Rigdon, Becker, and Sarstedt (2019a) show that common factor models can be subject to considerable degrees of metrological uncertainty. **Metrological uncertainty** refers to the dispersion of the measurement values that can be attributed to the object or concept being measured (JCGM/WG1, 2008). Numerous sources contribute to metrological uncertainty such as defnitional uncertainty or limitations related to the measurement scale design, which go well beyond the simple standard errors **<sup>1</sup>** produced by CB-SEM analyses (Hair & Sarstedt, 2019). As such, uncertainty is a validity threat to measurement and has adverse consequences for the replicability of study fndings (Rigdon, Sarstedt, & Becker, 2020). While uncertainty also applies to composite-based SEM, the way researchers treat models in CB-SEM analyses typically leads to a pronounced increase in uncertainty (Rigdon & Sarstedt, 2021). More precisely, in an effort to improve model ft, researchers typically reduce the number of indicators per construct, which in turn increases uncertainty (Hair, Matthews, Matthews, & Sarstedt, 2017; Rigdon et al., 2019a). These issues do not necessarily imply that composite models are superior, but they cast considerable doubt on the assumption of some researchers that CB-SEM constitutes the gold standard when measuring unobservable concepts. In fact, researchers in various felds of science show increasing appreciation that common factors may not always be the right approach to measure concepts (e.g., Rhemtulla, van Bork, & Borsboom, 2020; Rigdon, 2016). Similarly, Rigdon, Becker, and Sarstedt (2019b) show that using sum scores can signifcantly increase the degree of metrological uncertainty, which questions this measurement practice.

Apart from differences in the philosophy of measurement, the differing treatment of latent variables and, more specifcally, the availability of **construct scores** also have consequences for the methods' areas of application. Specifcally, while it is possible to estimate latent variable scores within a CB-SEM framework, these estimated scores are not unique. That is, an infnite number of different sets of latent variable scores that will ft the model equally well are possible. A crucial consequence of this **factor (score) indeterminacy** is that the correlations between a common factor and any variable outside the factor model are themselves indeterminate (Guttman, 1955). That is, they may be high or low, depending on which set of factor scores one chooses. As a result, this limitation makes CB-SEM grossly unsuitable for **prediction** (e.g., Dijkstra, 2014; Hair & Sarstedt, 2021). In contrast, a major advantage of PLS-SEM is that it always produces a single specifc (i.e., determinate) score for each composite of each observation, once the indicator weights/loadings are established. These determinate scores are proxies of the theoretical concepts being measured, just as factors are proxies for the conceptual variables in CB-SEM (Rigdon et al., 2017; Sarstedt et al., 2016).

Using these proxies as input, PLS-SEM applies ordinary least squares regression with the objective of minimizing the error terms (i.e., the residual variance) of the endogenous constructs. In short, PLS-SEM estimates coeffcients (i.e., path model relationships) with the goal of maximizing the R2 values of the endogenous (target) constructs. This feature achieves the (in-sample) prediction objective of PLS-SEM (Hair & Sarstedt, 2021), which is therefore the preferred method when the research objective is theory development and explanation of variance (prediction of the constructs). For this reason, PLS-SEM is also regarded a **variancebased SEM** approach. Specifcally, the logic of the PLS-SEM approach is that all of the indicators' variance should be used to estimate the model relationships, with particular focus on prediction of the dependent variables (e.g., McDonald, 1996). In contrast, CB-SEM divides the total variance into three types – common, unique, and error variance – but utilizes only common variance (i.e., the variance shared with other indicators in the same measurement model) for the model estimation (Hair, Black, et al., 2019). That is, CB-SEM only explains the covariation between measurement and structural model indicators (Jöreskog, 1973) and does not focus on predicting dependent variables (Hair, Matthews, et al., 2017).

#### !**Attention**

PLS-SEM is similar but not equivalent to **PLS regression**, another popular multivariate data analysis technique (Abdi, 2010; Wold, Sjöström, & Eriksson, 2001). PLS regression is a regression-based approach that explores the linear relationships between multiple independent variables and a single or multiple dependent variable(s). PLS regression differs from regular regression, however, because, in developing the regression model, the method derives composite factors from the multiple independent variables by means of principal component analysis. PLS-SEM, on the other hand, relies on prespecifed networks of relationships between constructs as well as between constructs and their measures (see Mateos-Aparicio, 2011, for a more detailed comparison between PLS-SEM and PLS regression).

#### **1.4 Considerations When Applying PLS-SEM**

#### **1.4.1 Key Characteristics of the PLS-SEM Method**

Several considerations are important when deciding whether or not to apply PLS-SEM. These considerations also have their roots in the method's characteristics. The statistical properties of the PLS-SEM algorithm have important features associated with the characteristics of the data and model used. Moreover, the properties of the PLS-SEM method affect the evaluation of the results. Four critical issues are relevant to the application of PLS-SEM (Hair et al., 2011; Hair, Risher, et al., 2019): (1) data characteristics, (2) model characteristics, (3) model estimation, and (4) model evaluation. . Table 1.2 summarizes the key characteristics of the PLS-SEM method. An initial overview of these issues is provided in this chapter. For a more detailed explanation, see Hair et al. (2022).

PLS-SEM works effciently with small sample sizes and complex models (Cassel, Hackl, & Westlund, 1999; Hair, Sarstedt, & Ringle, 2019). In addition, different from maximum likelihood-based CB-SEM, which requires normally distributed data, PLS-SEM makes no distributional assumptions (i.e., it is nonparametric). PLS-SEM can easily handle refective and formative measurement models, as well as single-item constructs, with no identifcation problems. It can therefore be applied in a wide variety of research situations. When applying PLS-SEM, researchers also beneft from high effciency in parameter estimation, which is manifested in the method's greater **statistical power** in comparison to that of CB-SEM. Greater statistical power means that PLS-SEM is more likely to render a specifc relationship signifcant when it is in fact present in the population. The same holds for the comparison with regression using sum score data, which is also characterized by lower statistical power than PLS-SEM (Hair, Hollingsworth, et al., 2017).

#### **1** ..      **Table 1.2** Key characteristics of PLS-SEM

Source: Adapted and extended from Hair et al. (2011). Copyright © 2011 by M.E. Sharpe, Inc. Reprinted by permission of the publisher (Taylor & Francis Ltd., 7 http://www. tandfonline.com)

There are, however, several limitations of PLS-SEM. In its basic form, the technique cannot be applied when structural models contain causal loops or circular relationships between the latent variables (i.e., non-recursive models). Early extensions of the basic PLS-SEM algorithm that have not yet been implemented in standard PLS-SEM software packages, however, enable the handling of circular relationships (Lohmöller, 1989). Furthermore, since PLS-SEM does not have an established global goodness-of-ft measure, its use for theory testing and confrmation is more limited in certain situations. Recent research has attempted to promote common goodness-of-ft measures within a PLS-SEM framework (Schuberth, Henseler, & Dijkstra, 2018) but with very limited success. The concept of model ft – as defned in CB-SEM – is not applicable to PLS-SEM because of the methods' **<sup>1</sup>** different functioning principles (Hair, Sarstedt, & Ringle, 2019). Instead, PLS-SEM-based model estimation and assessment follow a causal–predictive paradigm, in which the objective is to test the predictive power of a model, derived from theory and logic. As such, the method strikes a balance between machine learning methods, which are fully predictive in nature and CB-SEM, which focuses on confrmation and model ft (Richter, Cepeda Carrión, Roldán, & Ringle, 2016). Its causal–predictive nature makes PLS-SEM particularly appealing for research in felds that aim to derive recommendations for practice. For example, recommendations in managerial implication sections in business research journals always include predictive statements ("our results suggest that managers should…"). Making such statements requires a prediction focus on model estimation and evaluation (Sarstedt & Danks, 2021). PLS-SEM perfectly emphasizes this need as the method sheds light on the mechanisms (i.e., the structural model relationships) through which the predictions are generated (Hair, 2020; Hair & Sarstedt, 2019, 2021).

In early writing, researchers noted that PLS estimation is "deliberately approximate" to factor-based SEM (Hui & Wold, 1982, p. 127), a characteristic previously referred to as the **PLS-SEM bias** (e.g., Chin, Marcolin, & Newsted, 2003). A number of studies have used simulations to demonstrate the alleged PLS-SEM bias (e.g., Goodhue, Lewis, & Thompson, 2012; McDonald, 1996; Rönkkö & Evermann, 2013). According to prior research on the PLS-SEM bias, measurement model estimates are biased upward, whereas structural model estimates are biased downward compared to CB-SEM results. The studies conclude that parameter estimates will approach what has been labeled the "true" parameter values when both the number of indicators per construct and sample size increase (Hui & Wold, 1982). However, all the abovementioned simulation studies used CB-SEM as the benchmark against which the PLS-SEM estimates were evaluated with the assumption that they should be the same. Because PLS-SEM is a composite-based approach, which uses the total variance to estimate parameters, differences can be expected in such an assessment (Lohmöller, 1989; Schneeweiß, 1991). Not surprisingly, the very same issues apply when composite models are used to estimate CB-SEM results. In fact, Sarstedt et al. (2016) show that the bias produced by CB-SEM is far more severe than that of PLS-SEM, when applying the method to the wrong type of model (i.e., estimating composite models with CB-SEM versus estimating common factor models with PLS-SEM). Apart from these conceptual concerns, simulation studies show that the differences between PLS-SEM and CB-SEM estimates, when assuming the latter as a standard of comparison, are very small, provided that measurement models meet minimum recommended standards in terms of measurement quality (i.e., reliability and validity). Specifcally, when the measurement models have four or more indicators and indicator loadings meet the common standards (≥ 0.70), there are practically no differences between the two methods in terms of parameter accuracy (e.g., Reinartz, Haenlein, & Henseler, 2009; Sarstedt et al., 2016). Thus, the extensively discussed PLS-SEM bias is of no practical relevance for the vast majority of applications (e.g., Binz Astrachan, Patel, & Wanzenried, 2014).

Finally, methodological research has substantially extended the original PLS-SEM method by introducing advanced modeling, assessment, and analysis procedures. Examples include different types of robustness checks (Sarstedt et al., 2020), higher-order constructs (Sarstedt, Hair, Cheah, Becker, & Ringle, 2019), discrete choice modeling (Hair, Sarstedt, & Ringle, 2019), necessary condition analysis and related methods (Rasoolimanesh, Ringle, Sarstedt, & Olya, 2021; Richter, Schubring, Hauff, Ringle, & Sarstedt, 2020), and out-of-sample prediction metrics (Hair, 2020). Hair, Sarstedt, Ringle, and Gudergan (2018) offer an introduction into several of these advanced topics.

In the following, we discuss aspects related to data characteristics (e.g., minimum sample size requirements) and model characteristics (e.g., model complexity).

#### **1.4.2 Data Characteristics**

Data characteristics, such as minimum sample size requirements, non-normal data, and scales of measurement (i.e., the use of different scale types), are among the most often stated reasons for applying PLS-SEM across numerous disciplines (e.g., Ghasemy, Teeroovengadum, Becker, & Ringle, 2020; Hair, Sarstedt, Ringle, & Mena, 2012; Ringle et al., 2020). While some of the arguments are consistent with the method's capabilities, others are not. In the following sections, we discuss these and also aspects related data characteristics.

#### **<IP_ADDRESS> Minimum Sample Size Requirements**

Small sample size is likely the most often abused reason stated for using PLS-SEM, with some researchers obtaining model solutions with unacceptably low sample sizes (Goodhue et al., 2012; Marcoulides & Saunders, 2006). These researchers oftentimes believe there is some "magic" in the PLS-SEM approach that allows them to use a very small sample to obtain results representing the effects that exist in large populations of several million elements or individuals. No multivariate analysis technique, including PLS-SEM, has this kind of "magic" inferential capability (Petter, 2018).

PLS-SEM can certainly obtain solutions with smaller samples, but the population's nature determines the situations in which small sample sizes are acceptable (Rigdon, 2016). For example, in business-to-business research, populations are often restricted in size. Assuming that other situational characteristics are equal, the more heterogeneous the population, the larger the sample size needed to achieve an acceptable accuracy (Cochran, 1977). If basic sampling theory guidelines are not considered (Sarstedt, Bengart, Shaltoni, & Lehmann, 2018), questionable results are produced.

In addition, when applying multivariate analysis techniques, the technical dimension of the sample size becomes relevant. Adhering to the minimum sample size guidelines ensures the results of a statistical method, such as PLS-SEM, have adequate statistical power. In these regards, an analysis based on an insuffcient sample size may not reveal an effect that exists in the underlying population (which results in committing a type II error). Moreover, executing statistical analyses based on minimum sample size guidelines will ensure the results of the statistical method are robust and the model is generalizable to another sample from that

**<sup>1</sup>** same population. Thus, an insuffcient sample size may lead to PLS-SEM results that differ from those of another larger sample. In the following, we focus on the PLS-SEM method and its technical requirements of the minimum sample size.

The overall complexity of a structural model has little infuence on the **minimum sample size requirements** for PLS-SEM. The reason is the PLS-SEM algorithm does not compute all relationships in the structural model at the same time. Instead, it uses ordinary least squares regressions to estimate the model's partial regression relationships. Two early studies systematically evaluated the performance of PLS-SEM with small sample sizes and concluded that the method performed well (e.g., Chin & Newsted, 1999; Hui & Wold, 1982). More recently, simulation studies by Hair et al. (2017) and Reinartz et al. (2009) indicate that PLS-SEM is the method of choice when the sample size is small. Moreover, compared with its covariance-based counterpart, PLS-SEM has higher levels of statistical power in situations with complex model structures and smaller sample sizes. Similarly, Henseler et al. (2014) show that results can be obtained with PLS-SEM when other methods do not converge or provide inadmissible solutions. For example, problems often are encountered when using CB-SEM on complex models, especially when the sample size is limited. Finally, CB-SEM encounters identifcation and convergence issues when formative measures are involved (e.g., Diamantopoulos & Riefer, 2011).

Unfortunately, some researchers believe sample size considerations do not play a role in the application of PLS-SEM. This idea has been fostered by the oftencited 10-time rule (Barclay, Higgins, & Thompson, 1995), which suggests the sample size should be equal to 10 times the number of independent variables in the most complex regression in the PLS path model (i.e., considering both measurement and structural models). This rule of thumb is equivalent to saying the minimum sample size should be 10 times the maximum number of arrowheads pointing at a latent variable anywhere in the PLS path model. While this rule offers a rough guideline, the minimum sample size requirement should consider the statistical power of the estimates. To assess statistical power, researchers can consider power tables (Cohen, 1992) or power analyses using programs, such as G\*Power (Faul, Erdfelder, Buchner, & Lang, 2009), which is available free of charge at 7 http:// www.gpower.hhu.de/. These approaches do not explicitly consider the entire model but instead use the most complex regression in the (formative) measurement models and structural model of a PLS path model as a point of reference for assessing the statistical power. In doing so, researchers typically aim at achieving a power level of 80%. However, the minimum sample size resulting from these calculations may still be too small (Kock & Hadaya, 2018).

Addressing these concerns, Kock and Hadaya (2018) proposed the **inverse square root method**, which considers the probability that the ratio of a path coeffcient and its standard error will be greater than the critical value of a test statistic for a specifc signifcance level. The results depend, therefore, on only one path coeffcient and are dependent neither on the size of the most complex regression in the (formative) models nor on the size of the overall model. Assuming a common power level of 80% and signifcance levels of 1%, 5%, and 10%, the minimum sample size (nmin) is given by the following equations, respectively, where pmin is the value of the path coeffcient with the minimum magnitude in the PLS path model:

$$\text{Significance level} = 1\% \text{: } n\_{\text{min}} > \left(\frac{3.168}{\left| p\_{\text{min}} \right|}\right)^2 \cdot 1$$

$$\left(\text{\textbullet } 49^\circ \text{\textbullet}\right)^2$$

$$\text{Significance level} = \mathcal{S}\% \colon \eta\_{\text{min}} > \left(\frac{2.486}{\left| p\_{\text{min}} \right|}\right)^{-1}.$$

Signifcance level = 10%: *n p* min min . <sup>&</sup>gt; æ è ç ç ö ø ÷ ÷ 2 123 2 .

For example, assuming a signifcance level of 5% and a minimum path coeffcient of 0.2, the minimum sample size is given by

$$n\_{\min} > \left(\frac{2.486}{0.2}\right)^2 = 1.54.505... $$

This result needs to be rounded to the next integer, so the minimum sample size is 155.

The inverse square root method is rather conservative, in that it slightly overestimates the sample size required to render an effect signifcant at a given power level. Most importantly, the method is characterized by its ease of use, since it can be readily implemented.

Nevertheless, two considerations are important when using the inverse square root method. First, by using the smallest statistical path coeffcient as the point of reference, the method can be misleading as researchers will not expect marginal effects to be signifcant. For example, assuming a 5% signifcance level and a minimum path coeffcient of 0.01 would require a sample size of 61,802! Hence, researchers should choose a higher path coeffcient as input, depending on whether the model produces either overall weak or strong effects or the smallest relevant (to be detected) effect.

Second, by relying on model estimates, the inverse square root method follows a retrospective approach. As a result, this assessment approach can be used as a basis for additional data collection or adjustments in the model. If possible, however, researchers should follow a prospective approach by trying to derive the minimum expected effect size prior to data analysis. To do so, researchers can draw on prior research involving a comparable conceptual background or models with similar complexity or, preferably, the results of a pilot study, which tested the hypothesized model using a smaller sample of respondents from the same population. For example, if the pilot study produced a minimum path coeffcient of 0.15, this value should be chosen as input for computing the required sample size for the main study.

Source: Hair et al. (2022), Chap. 1; used with permission by Sage

In most cases, however, researchers have only limited information regarding the expected effect sizes, even if a pilot study has been conducted. Hence, it is reasonable to consider ranges of effect sizes rather than specifc values to determine the sample size required for a specifc study. . Table 1.3 shows the minimum sample size requirement for different signifcance levels and varying ranges of pmin. In deriving the minimum sample size, it is reasonable to consider the upper boundary of the effect range as reference, since the inverse square root method is rather conservative. For example, when assuming that the minimum path coeffcient expected to be signifcant is between 0.11 and 0.20, one would need approximately 155 observations to render the corresponding effect signifcant at 5%. Similarly, if the minimum path coeffcient expected to be signifcant is between 0.31 and 0.40, then the recommended sample size would be 39.

#### **<IP_ADDRESS> Missing Value Treatment**

As with other statistical analyses, missing values should be dealt with when using PLS-SEM. For reasonable limits (i.e., less than 5% values missing per indicator), **missing value treatment** options, such as mean replacement, the EM (expectation– maximization) algorithm, and nearest neighbor (e.g., Hair, Black, et al., 2019), generally result in only slightly different PLS-SEM estimates (Grimm & Wagner, 2020). Alternatively, researchers can opt for deleting all observations with missing values, which decreases variation in the data and may introduce biases when certain groups of observations have been deleted systematically.

#### **<IP_ADDRESS> Non-normal Data**

The use of PLS-SEM has two other key advantages associated with data characteristics (i.e., distribution and scales). In situations where it is diffcult or impossible to meet the stricter requirements of more traditional multivariate techniques (e.g., normal data distribution), PLS-SEM is always the preferred method. PLS-SEM's greater fexibility is described by the label "soft modeling," coined by Wold (1982), who developed the method. It should be noted, however, that "soft" is attributed only to the distributional assumptions and not to the concepts, models, or estimation techniques (Lohmöller, 1989). PLS-SEM's statistical properties provide very robust model estimations with data that have normal as well as extremely nonnormal (i.e., skewness and/or kurtosis) distributional properties (Hair, Hollingsworth, et al., 2017; Hair, Matthews, et al., 2017; Reinartz et al., 2009). It must be remembered, however, that infuential observations, outliers, and collinearity do infuence the ordinary least squares regressions in PLS-SEM and researchers should evaluate the data and results for these issues (Hair, Black, et al., 2019).

#### **<IP_ADDRESS> Scales of Measurement**

The PLS-SEM algorithm generally requires variables to be measured on a **metric scale** (**ratio scale** or **interval scale**) for the measurement model indicators. But the method also works well with ordinal scales with equidistant data points (i.e., quasimetric scales; Sarstedt & Mooi, 2019; Chap. 3.6) and with binary-coded data. The use of binary-coded data is often a means of including categorical control variables (Hair et al., 2022) or moderators in PLS-SEM models. In short, binary indicators can be included in PLS-SEM models but require special attention. For example, using PLS-SEM in discrete choice experiments, where the aim is to explain or to predict a binary dependent variable, requires specifc designs and estimation routines (Hair, Ringle, Gudergan, Fischer, Nitzl, & Menictas, 2019).

#### **<IP_ADDRESS> Secondary Data**

**Secondary data** are data that have already been gathered, often for a different research purpose some time ago (Sarstedt & Mooi, 2019; Chap. 3.2.1). Secondary data are increasingly available to explore real-world phenomena. Research based on secondary data typically focuses on a different objective than in a standard CB-SEM analysis, which is strictly confrmatory in nature. More precisely, secondary data are mainly used in exploratory research to propose causal–predictive relationships in situations that have little clearly defned theory (Hair, Matthews, et al., 2017; Hair, Hollingsworth, et al., 2017). Such settings require researchers to place greater emphasis on examining all possible relationships rather than achieving model ft (Nitzl, 2016). By its nature, this process creates large, complex models that can hardly be analyzed with the CB-SEM method. In contrast, due to its less stringent data requirements, PLS-SEM offers the fexibility needed for the interplay between theory and data (Nitzl, 2016). Or, as Wold (1982, p. 29) notes, "soft modeling is primarily designed for research contexts that are simultaneously datarich and theory-skeletal." Furthermore, the increasing popularity of secondary data analysis (e.g., by using data that stem from company databases, social media, customer tracking, national statistical bureaus, or publicly available survey data) shifts the research focus from strictly confrmatory to predictive and causal–predictive modeling. Such research settings are a perfect ft for the prediction-oriented PLS-SEM approach and even more so when assessing out-of-sample prediction (Shmueli, et al., 2019).

PLS-SEM also proves valuable for analyzing secondary data from a measurement theory perspective. First, unlike survey measures, which are usually crafted to confrm a well-developed theory, measures used in secondary data sources are typ-

#### ..      **Table 1.4** Data considerations when applying PLS-SEM

Source: Hair et al. (2022), Chap. 1; used with permission by Sage

ically not created and refned over time for confrmatory analyses. Thus, achieving model ft is very unlikely with secondary data measures in most research situations when using CB-SEM. Second, researchers who use secondary data do not have the opportunity to revise or refne the measurement model to achieve ft. Third, a major advantage of PLS-SEM when using secondary data is that it permits the unrestricted use of single-item and formative measures. This is extremely valuable for research involving secondary data, because many measures included in corporate databases are artifacts, such as fnancial ratios and other frm-fxed factors (Henseler, 2017). Such artifacts typically are reported in the form of formative indices whose estimation dictates the use of PLS-SEM.

. Table 1.4 summarizes key considerations related to data characteristics.

#### **1.4.3 Model Characteristics**

PLS-SEM is very fexible in its modeling properties. In its basic form, the PLS-SEM algorithm requires all models to not include circular relationships or loops of relationships between the latent variables in the structural model. Although causal loops are sometimes specifed in business research, this characteristic does not limit the applicability of PLS-SEM, if such models are required as Lohmöller's (1989) extensions of the basic PLS-SEM algorithm allow for handling such model types. Other model specifcation requirements that constrain the use of CB-SEM, such as distribution and identifcation assumptions, are generally not relevant with PLS-SEM.

Measurement model diffculties are one of the major obstacles to obtaining a solution with CB-SEM. For instance, estimation of complex models with many latent variables and/or indicators is often impossible with CB-SEM. In contrast, PLS-SEM can easily be applied in such situations, since this method is not constrained by identifcation and other technical issues. Consideration of refective and formative measurement models is a key issue in the application of SEM (Bollen & Diamantopoulos, 2017). PLS-SEM can easily handle both formative and refective measurement models and is (therefore) considered the primary approach when the hypothesized model incorporates formative measures. CB-SEM can accommodate formative indicators, but to ensure model identifcation, they must follow distinct specifcation rules (Diamantopoulos & Riefer, 2011). In fact, the requirements often prevent running the analysis as originally planned. In contrast, PLS-SEM does not have such requirements and handles formative measurement models without any limitation. This also applies to model settings in which endogenous constructs are measured formatively. The applicability of CB-SEM to such model settings has been subject to considerable debate (Cadogan & Lee, 2013; Rigdon, 2014), but due to PLS-SEM's multistage estimation process (Tenenhaus et al., 2005), which separates measurement from structural model estimation, the inclusion of formatively measured endogenous constructs is not an issue in PLS-SEM (Rigdon et al., 2014). The only problematic issue is when high levels of collinearity exist between the indicator variables of a formative measurement model.

Different from CB-SEM, PLS-SEM facilitates easy specifcation of interaction terms to map moderation effects in a path model. This makes PLS-SEM the method of choice in simple moderation models and more complex conditional process models, which combine moderation and mediation effects (Sarstedt, Hair, et al., 2020). Similarly, higher-order constructs, which allow specifying a construct simultaneously on different levels of abstraction (Sarstedt et al., 2019), can readily be implemented in PLS-SEM.

Finally, PLS-SEM is capable of estimating very complex models. For example, if theoretical or conceptual assumptions support large models and suffcient data are available (i.e., meeting minimum sample size requirements), PLS-SEM can handle models of almost any size, including those with dozens of constructs and hundreds of indicator variables. As noted by Wold (1985), PLS-SEM is virtually without competition when path models with latent variables are complex in their structural relationships. . Table 1.5 summarizes rules of thumb for PLS-SEM model considerations.

#### ..      **Table 1.5** Model considerations when choosing PLS-SEM

Source: Hair et al. (2022), Chap. 1; used with permission by Sage)

# **<sup>1</sup> 1.5 Guidelines for Choosing Between PLS-SEM and CB-SEM**

Summarizing the previous discussions and drawing on Hair, Risher, et al. (2019), . Table 1.6 displays the rules of thumb applied when deciding whether to use CB-SEM or PLS-SEM. As can be seen, PLS-SEM is not recommended as a universal alternative to CB-SEM. Both methods differ from a statistical point of view, are designed to achieve different objectives, and rely on different measurement philosophies. Neither of the techniques is generally superior to the other, and neither of them is appropriate for all situations (Petter, 2018). Hence, to answer the question of when to use PLS-SEM versus CB-SEM, researchers should focus on the characteristics and objectives that distinguish the two methods (Hair, Sarstedt, Ringle, & Mena, 2012). Broadly speaking, with its strong focus on model ft and in light of its extensive data requirements, CB-SEM is particularly suitable for testing a theory in the confnement of a concise theoretical model. However, if the primary research objective is prediction and explanation of target constructs (Rigdon, 2012), PLS-SEM should be given preference (Hair, Sarstedt, & Ringle, 2019; Hair, Hollingsworth, Randolph, & Chong, 2017).

In general, the strengths of PLS-SEM are CB-SEM's limitations and vice versa, although PLS-SEM is increasingly being applied for scale development and confr-

..      **Table 1.6** Rules of thumb for choosing between PLS-SEM and CB-SEM

*Use PLS-SEM when*

The analysis is concerned with testing a theoretical framework from a prediction perspective, particularly out-of-sample prediction

The structural model is complex and includes many constructs, indicators, and/or model relationships

The research objective is to better understand increasing complexity by exploring theoretical extensions of established theories (exploratory research for theory development)

The path model includes one or more formatively measured constructs

The research consists of fnancial ratios or similar types of artifacts

The research is based on secondary data, which may lack a comprehensive substantiation on the grounds of measurement theory

A small population restricts the sample size (e.g., business-to-business research), but note that PLS-SEM also works very well with large sample sizes

Distribution issues are a concern, such as lack of normality

The research requires latent variable scores for follow-up analyses

*Use CB-SEM when*

The goal is theory testing and confrmation

Error terms require additional specifcation, such as the covariation

The structural model has circular relationships

The research requires a global goodness-of-ft criterion

Source: Adapted from Hair, Risher, et al. (2019). Copyright © 2019 by Emerald Publishing. Reprinted by permission of the publisher (Emerald Publishing; 7 https://www. emeraldgrouppublishing.com)

mation (Hair, Howard, & Nitzl, 2020). It is important that researchers understand the different applications each approach was developed for and use them accordingly. Researchers need to apply the SEM technique that best suits their research objective, data characteristics, and model setup (Roldán & Sánchez-Franco, 2012).

#### **Summary**

SEM is a second-generation multivariate data analysis method, which facilitates analyzing the relationships among constructs, each measured by one or more indicator variables. The primary advantage of SEM is its ability to measure complex model relationships while accounting for measurement error inherent in the indicators. There are two types of SEM methods – CB-SEM and PLS-SEM. The two method types differ in the way they estimate the model parameters and their assumptions regarding the nature of measurement. Compared to CB-SEM, PLS-SEM emphasizes prediction, while simultaneously relaxing the demands regarding the data and specifcation of relationships. PLS-SEM aims at maximizing the endogenous latent variables' explained variance by estimating partial model relationships in an iterative sequence of ordinary least squares regressions. In contrast, CB-SEM estimates model parameters, such that the discrepancy between the estimated and sample covariance matrices is minimized. Instead of following a common factor model logic in estimating concept proxies as CB-SEM does, PLS-SEM calculates composites of indicators that serve as proxies for the concepts under research. The method is not constrained by identifcation issues, even if the model becomes complex – a situation that typically restricts CB-SEM use – and does not rely on distributional assumptions. Moreover, PLS-SEM can better handle formative measurement models and has advantages when sample sizes are relatively small as well as when analyzing secondary data. Researchers should consider the two SEM approaches as complementary and apply the SEM technique that best suits their research objective, data characteristics, and model setup.

#### ?**Exercise**

Please answer the following questions:

# **<sup>1</sup> References**

**1**

tative comparative analysis. *International Journal of Contemporary Hospitality Management*, 33(5), 1571–1592.

#### **Suggested Readings**

Jöreskog, K. G., & Wold, H. (1982). The ML and PLS techniques for modeling with latent variables: Historical and comparative aspects. In H. Wold & K. G. Jöreskog (Eds.), *Systems under indirect observation, part I* (pp. 263–270). Amsterdam: North-Holland.

Lohmöller, J.-B. (1989). *Latent variable path modeling with partial least squares*. Heidelberg: Physica.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Overview of R and RStudio**

#### **Contents**

#### **Learning Objectives**

After reading this chapter, you will understand:

#### **2.1 Introduction**

This chapter introduces the two software packages that will be used throughout this textbook. Software **packages** are a series of software functions and features with a similar purpose bundled into a single set. First, we introduce the R statistical computing language (R Core Team, 2021), which is the software language we will use to import and clean data as well as create and analyze PLS path models. We will then introduce the RStudio (RStudio Team, 2021) application, which is an integrated development environment that enables you to easily and productively conduct computational analyses using the R language. We will explain how to download and install the software required, how to interact with the software, and how to store your data and code.

We then offer a basic introduction to writing analytic scripts in R. This textbook will not serve as a comprehensive resource for learning R, so we will share further resources for learning this programming language and helpful documentation on the Internet. Additionally, we will provide examples of R code throughout this textbook, so we start by looking at the syntax and formatting that we will use to distinguish code from regular text.

#### **2.2 Explaining Our Syntax**

Throughout this textbook, it will be necessary to discuss various elements of the code when explaining how to perform analytic operations using R. For the sake of clarity, we will use a distinguishable formatting and syntax of code in either code blocks or embedded in the text. Code in the R language will be formatted as follows: **vector <- c(1, 2, 3, 4, 5)**. To distinguish code embedded in the text from regular text, the code will be bolded; and to distinguish arguments from regular code, the arguments will be italicized (*weights =*, *data =*). Furthermore, construct and variable names in the text will be italicized to distinguish them (e.g., *QUAL* and *qual\_1*). We will use a similar format when code is used in a larger block. . Table 2.1 provides a summary of the syntax and format of code that we use in this textbook. You may want to refer back to it when we show larger blocks of code.

..      **Table 2.1** Syntax conventions used in this textbook (source: authors' own table)

The code block below also includes comments that describe the purpose of the following line of code. Comments are not run by the programming language and only serve as communication to other users of the code about the purpose. Comments in the R language begin with a pound symbol ("#"), and we will display them in gray (again, see the code block below).

```
# Create a vector of integers
vector <- c(1, 2, 3, 4, 5)
```
#### **2.3 Computational Statistics Using Programming**

Data analytics using computationally intensive methods is becoming an increasingly important, strategic capability for companies to transform the data collected during business activities into information that can assist effective decision-making and policy creation. Similarly, academic research is rapidly adopting computational methods, involving the implementation of analytic techniques for inferential analysis and machine learning into computer programs (Hair & Sarstedt, 2021). Thus, researchers who learn and adopt computational methods will have the advantage of being able to apply and adapt the latest techniques to their research, while also being competent and conversant with industry trends.

We expect that many quantitative researchers are already familiar with certain types of software to analyze data: spreadsheet software, such as Apache OpenOffce Calc (7 https://www.openoffce.org/product/calc.html) or Microsoft Excel (7 https://www.microsoft.com/microsoft-365/excel), and more graphical, menudriven software like IBM SPSS (7 https://www.ibm.com/products/spss-statistics) and Statistica (7 https://www.statsoft.de/de/software/statistica). Spreadsheet software has long been of value to business researchers, since a familiar ledger or balance book metaphor is adopted that predates computers. Spreadsheets are advantageous for smaller datasets, since they make it easy for users to manipulate data in tabular form and obtain quick results in the same interface as their data. Graphical, menu-driven software has also become popular during recent decades, since it is easier to learn and process for many users and provides rich visualizations. Both of these advantages allow software like SPSS and Tableau (7 https:// www.tableau.com) to facilitate communication between stakeholders and conduct data exploration interactively in meetings.

Computational analytics using programming syntax has been present since the earliest days of computing, but has recently gained new popularity from the advent of big data analytics, artifcial intelligence, and the larger data science movement. By programming in a syntactic language, such as R or Python (Van Rossum & Drake, 1995), analysts can apply complex methods that are not easy to parameterize with spreadsheet or graphical, menu-driven software. Computation offers analysts the ability to run simulations that test particular scenarios and create novel solutions and custom visualizations, which were not considered by others, or are rather specifc to one's own use case. Moreover, the code that analysts generate serves as a manifest – or recipe – of their workfow that can be shared with other analysts or even deployed into online products and platforms. Finally, having code allows others to test, repeat, or replicate analyses in perfect detail – steps that are vital to modern applications of the scientifc process (Rigdon, Sarstedt, & Becker, 2020). It is not surprising, therefore, that computational methods have become an integral component of the data science revolution in both industry and academia.

#### **2.4 Introducing R and RStudio**

R is a free, open-source software, which enables users to write and execute code that analyzes data. Readers should note that the name "R" can refer to both the programming language and the primary software that runs code written in this language. However, unless otherwise specifed, in this book, R refers to the language. Further, **open source** refers to the kind of software whose underlying code is made freely available and is generally open to suggested improvements or new features built by others. The open-source nature of the R software makes code written in the R language highly reproducible, shareable, testable, scalable, and deployable to larger automated applications. An ever-expanding community of R users supports, tests, documents, and provides add-on resources for each other.

R (R Core Team, 2021) is an alternate implementation of the earlier S programming language, which was frst developed by Ross Ihaka and Robert Gentleman in 1991 (Hornik & Leisch, 2002). The R language had been developed for several years, became free and open source in 1995, and started to gain attention with the frst stable release on the Comprehensive R Archive Network (CRAN; 7 http:// www.r-project.org) in February 2000. CRAN serves as a vetted repository where reliable add-on packages of R code libraries can be freely contributed to or downloaded by R users around the world (packages are discussed in more detail in 7 Sect. 2.6). The SEMinR package for PLS-SEM (Ray, Danks, & Valdez, 2021) we use in this book is also available on CRAN.

The R language was designed with computational statistics in mind. In its simplest form, it can be run from your operating system's command line or from the R

..      **Fig. 2.1** The R console. (Source: authors' screenshot from R)

console (. Fig. 2.1). However, we recommend using R from the convenience of an **integrated development environment (IDE)**, such as RStudio. An IDE is a programming environment that offers tools such as project management, tabs for easily managing multiple script fles, and additional developer tools. We discuss the layout of the RStudio IDE in more detail in the next section. Throughout this book, we will demonstrate the use of R from within the RStudio IDE.

#### **2.4.1 Installing R and RStudio**

Before installing RStudio, the R software for executing code in the programming language must be installed on your operating system. The latest version of the R software for your operating system is available from the CRAN archive at the 7 http://www.r-project.org website. Once you visit that website, click on the **Download R** link, select the mirror website closest to your location, and then

choose the download fle made for your operating system. Execute the download fle and follow the instructions; the R software will then install on your computer.

Next, you will need to install RStudio from this website (7 http://www.rstudio. com/). To do so, hover your mouse pointer over the **Products** menu and select **RStudio** from the dropdown menu. On the next page, click on the **Download RStudio Desktop** button, and once again click **Download RStudio Desktop**. The website will offer you the relevant version for your operating system. Execute the download fle and follow the instructions. The RStudio IDE will then install on your computer. With both the R software and RStudio software installed on your computer, you can proceed to become familiar with the RStudio layout and interface.

#### **2.4.2 Layout of RStudio**

The RStudio desktop in its standard form comes with a layout of four primary windows: (1) In the upper-left corner is the source window; (2) in the upper right are the environment, history, connections, build, and git windows; (3) in the bottom left are the console and terminal windows; and (4) in the bottom right are the fles, plots, packages, help, and viewer windows (. Fig. 2.2). Note that the source window only shows when data have been loaded. We will discuss this step in 7 Chap. 3. Some of these windows are only available when settings have been enabled. For example, the git tab is only available when version control has been enabled and the build tab is only available when a package is being built. . Table 2.2 describes the various windows and their uses in more detail.

..      **Fig. 2.2** The RStudio IDE desktop layout. (Source: authors' screenshot from RStudio)

..      **Table 2.2** Table of the RStudio IDE desktop tabs, layout, and purpose

Source: authors' own table

#### **2.5 Organizing Your Projects**

Organizing projects is much like organizing your documents in regular folders on your computer. The only major difference is you will need to remember where fles are stored when loading fles into or saving fles out of the R environment. That is, you need to know the address of the fle relative to the fle you are editing. Often, users of R will create a catchall project (named workspace), in which they store their R script fles, data fles, and output fles for multiple analyses or projects. This approach can quickly lead to chaos – the mixing of projects and the overwriting of crucial code and data fles. Instead, we recommend you create separate projects and

..      **Fig. 2.3** Creating a new project in RStudio. (Source: authors' screenshot from RStudio)

organize them carefully, so that you keep the contents of each project separately and provide some order to your workfow.

To begin a new project in RStudio, click on the **File** dropdown menu, and select **New Project…** (. Fig. 2.3). The **Create Project** window will then open and guide you through creating a new project. When you create your frst project, you need to set up a **New Directory** which stores all your project fles. Next, click on **New Project**. In the dialog box that follows, specify a project name under **Directory name** and choose a folder in which the project fles should be stored. Finally, click on **Create Project**.

An important feature of an R project is that the working directory, in which the project will be conducted, is specifed. If at any time you wish to change the work-

..      **Fig. 2.4** Changing the working directory. (Source: authors' screenshot from RStudio)

ing directory, this can be done by clicking on the **Session** dropdown menu, selecting **Set Working Directory,** and then specifying the correct location (. Fig. 2.4).

R project details are stored in an .Rproj fle in the project directory. In addition, the environment containing any objects saved to memory is stored in the .Rdata fle, and the history of keystrokes and commands run in the console is stored in an .Rhistory fle. Thus, a snapshot is kept of your activity in the project, which is reloaded every time you reopen the project. Note, however, that the packages required to run your code need to be reloaded every time you reopen a project and are not stored in the snapshot.

#### **2.6 Packages**

R includes a lot of preinstalled **packages** containing many of the standard functions and algorithms you will use in your statistical computations. Examples of such standard functions are **mean()** and **sd()** for calculating the mean and standard deviation of a vector, respectively, or **lm()** for generating linear regression models. While you should be able to fulfll much of your computational needs with the standard packages bundled in R, you might need to install further software libraries containing newer or more complicated algorithms. Such software libraries are bundled as packages that, when installed, add a new range of functions and operations. Examples of popular packages are **dplyr**, **ggplot**, and, of course, the package used in this book, **seminr**.

..      **Fig. 2.5** Installing packages from the RStudio IDE. (Source: authors' screenshot from RStudio)

A majority of packages are hosted on CRAN. The packages hosted on CRAN have met certain criteria to qualify for being published in the CRAN archive, such as having documentation, being tested, and kept up to date with the latest versions of R. These packages can be installed from the command line or from the packages tab (. Fig. 2.1 and . Table 2.2). Note that you will need internet access to install packages from CRAN. To install new packages, select the **Packages** tab in the lower right window of the RStudio IDE, click the **Install** button, set **Install from** to **Repository (CRAN)**, and enter the package name in the **Packages** feld: "seminr" (. Fig. 2.5). Next, click on **Install**.

Packages can also be installed from the command line using the **install. packages()** function. In this case, we wish to install the **swirl** package, which teaches you R programming (see 7 Sect. 2.7 for more details on the **swirl** package). We therefore set the *pkgs* parameter equal to **"swirl"**.

```
# Install the Swirl package
install.packages(pkgs = "swirl")
```
Note that packages are installed to the local software library on your computer but are not loaded into the RStudio local environment. Once a package is installed, it will be available for computation in R but has to be loaded using the **library()** function prior to use. Packages must be loaded in each session if you wish to use the functions in this library. If the package is not loaded in a new session (i.e., after opening and rerunning R), the features will not be available in your session until you load the package by using the **library()** function.

```
# Load the Swirl package into the environment
library(swirl)
```
#### **2.7 Writing R Scripts**

Computational analyses are conducted by writing a series of instructions to the computer on how to import data, modify data, run algorithms for analyzing the data, and then report the results of those analyses. These instructions take the form of **R scripts** that are typically entered into a fle, which contains all the scripts related to a single analysis or computation. These R script fles have the suffx .R and are stored in your project directory.

To successfully conduct such analyses, you need to learn the form and function of the scripts that R can process. As indicated above, a key reason for using a free, opensource software, like R, is the community support and resources typically found for such software. A simple Internet search with keywords "R coding lesson" should provide hundreds of high-quality resources. We recommend swirl (7 https://swirlstats. com/), which teaches you R programming by offering simple and useful lessons. This package helps the user become experienced at working with R's command-based interface and can be downloaded and used from the R console command line.

```
# Begin learning with Swirl
swirl()
```
In addition to online tutorials and code lessons, there are many free e-books describing both introductory and advanced usage of R and RStudio. A good archive for textbooks is available at the CRAN website (7 https://www.r-project. org/other-docs.html). We highly recommend the book *R for Data Science* (Wickham & Grolemund, 2016). As we continue with this chapter and the textbook, we assume that you have studied the basics of using R and are comfortable with the language. We now turn our attention to overcoming the various challenges you might encounter, while writing R scripts and when using the SEMinR package.

#### **2.8 How to Find Help in RStudio**

Due to the complexity of a programming language – and the almost endless number of software libraries that can be installed adding to the functions and resources available to you – it can become diffcult to keep track of how functions are called, what arguments they take, and what output they provide. Packages have a range of fles that are designed to document and demonstrate the use of the functions they provide. These fles take the form of R documentation, vignettes, and demonstration fles. In this section, we discuss how to access information on using a function by inspecting these documents.

All packages submitted to CRAN are required to have suffcient documentation to describe the functions they add to your software library. For each function, there should be a matching R documentation fle that can be accessed. **R documentation** describes the purpose, input, implementation, and output of a function and provides examples applying the syntax. The contents of an R document are described in . Table 2.3. This documentation can be accessed in the **help** tab in the lower right window of the RStudio IDE. Help topics and functions can be

Source: authors' own table

searched for in the search feld of the help window or from the command line in the console window using the **?** operator. For example, we can search for help on the **read.csv()** function by typing the following into the console window in RStudio:

```
# Searching for help using the ? operator
?read.csv
```
In . Fig. 2.6, we can see an excerpt of the contents of the R documentation for **read.csv()**. This information will be displayed in the **help** tab in the lower right window of the RStudio IDE and provides us with details on the purpose, arguments, and usage of the function and a demonstration example. When encountering a new function or an error, the R documentation is the frst place to look in. For a full list of available R documentation topics for a package, click on the **Pack-**

..      **Fig. 2.7** The SEMinR vignette. (Source: authors' screenshot from RStudio)

**ages** tab in the bottom right window and select the package name (highlighted in blue). The **Help** tab will then open with the full list of documentation available for that package.

Another very important document to consult for help using a package or function is the vignette. **Vignettes** are designed as an all-purpose user's guide for the package – they describe the problem that the package seeks to solve and how it is used. This document usually describes the functioning of the package in detail and provides examples and demonstrations of the problems and solutions. You can access a list of vignettes installed by calling the **vignette()** function. This will output a list of available vignettes to an R vignette tab in the top left window of RStudio. You can then run **vignette("SEMinR")** to access a particular vignette – in this case, the vignette for the package SEMinR (. Fig. 2.7).

```
# Check all vignettes available in R
vignette()
# Load the SEMinR vignette
vignette("SEMinR")
```
..      **Fig. 2.8** Finding help online using Stack Overfow. (Source: authors' screenshot from 7 https:// stackoverfow.com/)

Another source of help is using the demonstration code that comes bundled with most R packages. These demonstration fles typically include an example dataset and model to demonstrate the purpose of the package's functions. To check all available demonstration fles, use the **demo()** function. For the specifc demonstration of the European Customer Satisfaction Index (ECSI) model (Eklöf & Westlund, 2002) in the SEMinR package, as originally presented by Tenenhaus, Esposito Vinzi, Chatelin, and Lauro (2005), use **demo("seminr-pls-ecsi")**.

```
# Check all demos available in R
demo()
# Load the SEMinR ECSI demo
demo("seminr-pls-ecsi")
```
A fnal invaluable source of help can be found by accessing the greater R community on platforms such as Stack Overfow (7 https://stackoverfow.com/). These ask-and-answer forums put you in touch with seasoned veterans who can provide useful tips and other options for executing all your favorite R packages and functions. Members of these communities typically respond quickly and can provide excellent advice and solutions (. Fig. 2.8).

#### **Summary**

In this chapter, we introduced the R statistical programming language and its popular development environment, RStudio. You should now be familiar with the layout and functionality of RStudio, creating, downloading, and managing projects and RScript fles. If you encounter a bug or a function that is unfamiliar, you should now have the requisite tools (and knowledge) for seeking out appropriate help. We strongly recommend the careful study of an introductory program to learning the R language. We also recommend the **swirl** package for learning R and provide some ideas to assist you in fnding supplementary resources and gaining access to useful material.

In this chapter, we recommend the use of the **swirl** package to learn basic coding concepts and become familiar with the popular functions in R (see 7 Sects. 2.6 and 2.7 on installing and loading **swirl**). Please complete the following lessons in the **swirl** package:

#### **References**

#### **Suggested Readings**

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **The SEMinR Package**

#### **Contents**

#### **Learning Objectives**

After reading this chapter, you should understand:

SEMinR is a software package developed for the R statistical environment (R Core Team, 2021) that brings a user-friendly syntax to creating and estimating structural equation models. SEMinR is open source, which means that anyone can inspect, modify, and enhance the source code. SEMinR is distributed under a GNU General Public License version 3 (GPL-3), implying it is completely free for personal, academic, and commercial use – as long as any changes made to it, or applications built using it, are also open source.

SEMinR is hosted on GitHub (7 https://github.com/sem-in-r/seminr). We encourage users to follow the GitHub page for SEMinR and contribute to this project or use the *issues* feature to report bugs or problems. Users of SEMinR can also interact with the developers and each other at the Facebook group (7 https:// www.facebook.com/groups/seminr). Participants regularly discuss recent developments, best practices, and tutorials on basic functionality of SEMinR. We also encourage you to follow this Facebook group for updates on bugs, issues, and new features.

The SEMinR syntax enables applied practitioners of PLS-SEM to use terminology that is very close to their familiar modeling terms (e.g., refective, composite, and interactions), instead of specifying underlying matrices and covariances. Specifcally, the syntax was designed to:

SEMinR uses its own PLS-SEM estimation engine and integrates with the lavaan package (Rosseel, 2012) for CB-SEM estimation. SEMinR supports the state of the art of PLS-SEM and beyond. The development team regularly improves the program, incorporates new methods, and supports the users with useful reporting options in their analyses.

In 7 Chap. 2, we introduced R and RStudio. After reading that chapter, you should now be familiar with writing scripts, creating objects, and installing packages. In this chapter, we discuss how to use the SEMinR package. The frst step is to install the SEMinR package and load it into the RStudio environment (. Fig. 3.1). SEMinR was built using R version 4.0.3 – depending on how recently you installed R and RStudio, you might need to update these software fles to the latest version before installing SEMinR. Refer to 7 Chap. 2 for instructions on installing the latest versions of R and RStudio.

```
# Download and install the SEMinR package
# You only need to do this once to equip
# Rstudio on your computer with SEMinR
install.packages("seminr")
# Make the SEMinR library ready to use
# You must do this every time you restart Rstudio and wish to
use SEMinR
library(seminr)
```
..      **Fig. 3.1** Installing and loading the SEMinR package. (Source: authors' screenshot from RStudio)

#### **3.1 The Corporate Reputation Model**

With the SEMinR package installed and loaded to the environment, we now introduce the example dataset and model that will be used throughout this textbook. We draw on Eberl's (2010) corporate reputation model, which is also used in *A Primer on Partial Least Squares Structural Equation Modeling (PLS-SEM)* (Hair, Hult, Ringle, & Sarstedt, 2022). The goal of the model is to explain the effects of corporate reputation on customer satisfaction (*CUSA*) and, ultimately, customer loyalty (*CUSL*). Corporate reputation represents a company's overall evaluation by its stakeholders (Helm, Eggert, & Garnefeld, 2010). This construct is measured using two dimensions. One dimension represents cognitive evaluations of the company, which is the company's competence (*COMP*). The second dimension captures affective judgments, which determine the company's likeability (*LIKE*). Research has shown that the model performs favorably (in terms of convergent validity and predictive validity) compared to alternative reputation measures (Sarstedt, Wilczynski, & Melewar, 2013).

In summary, the simple corporate reputation model has two main theoretical components: (1) the target constructs of interest – namely, *CUSA* and *CUSL* (endogenous constructs) – and (2) the two corporate reputation dimensions *COMP* and *LIKE* (exogenous constructs), which are key determinants of the target constructs. . Figure 3.2 shows the constructs and their relationships.

Each of these constructs is measured by means of multiple indicators, except satisfaction. For instance, the endogenous construct *COMP* is refectively measured by three indicator variables, *comp\_1*, *comp\_2*, and *comp\_3*. Respondents answered on a scale from 1 (totally disagree) to 7 (completely agree) to evaluate the statements that these three items represent (. Table 3.1). Two other constructs in the simple model (*CUSL* and *LIKE*) can be described in a similar manner, and the third (*CUSA*) has only a single indicator. . Table 3.1 summarizes the indicator wordings for the four constructs considered in this simple corporate reputation

..      **Fig. 3.2** Simple corporate reputation model. (Source: authors' own fgure)

..      **Table 3.1** Indicators for the refectively measured constructs of corporate reputation model

model. In 7 Chap. 5, we will extend the simple model by adding four formatively measured constructs.

Now that you are familiar with the reputation model, we will demonstrate the syntax used by SEMinR. Briefy, there are four steps to specify and estimate a structural equation model using SEMinR:

#### **3.2 Loading and Cleaning the Data**

When estimating a PLS-SEM model, SEMinR expects you to have already loaded your data into an object. This data object is usually a **data.frame** class object, but SEMinR will also accept a **matrix** class object. For more information about these objects, you can access the R documentation using the **?** operator (e.g., **?matrix**). The **read.csv()** function allows you to load data into R if the data fle is in a .csv (comma-separated value) or .txt (text) format. Note that there are other packages that can be used to load data in Microsoft Excel's .xlsx format or other popular data formats.

**Comma-separated value (CSV) fles** are a type of text fle, whose lines contain the data of each subject or case of your dataset. The values in each line correspond to the different variables of interest (e.g., the frst, second, or third value of a line corresponds with the frst, second, or third variable in the dataset, from left to right). These values are typically separated by commas but can also be separated by other special characters (e.g., semicolons). The frst line of the fle typically consists of variable names, called the header line, and is also separated by commas or other special characters. Thus, a variable will have its name in the frst row at a certain position (e.g., ffth data entry), and its values will be in all the following lines of data at the same position (e.g., also at the ffth data entry position). Files in a .csv format are a popular way of storing datasets, and we will use it as an example in this chapter. Many software packages, such as Microsoft Excel and SPSS, can export data into a .csv format.

We can load data from a .csv fle using the **read.csv()** function. Remember that you can use the **?** operator to fnd help about a function in R (e.g., use **?read. csv**) at any time. . Table 3.2 shows several arguments for the **read.csv()** function as included in the help fle.

In this section, we will demonstrate how to load a .csv fle into the RStudio global environment. The fle we will use is called Corporate Reputation Data.csv and can be downloaded from the book's website at 7 https://www.pls-sem.net/ downloads/. Once you have downloaded the Corporate Reputation Data.csv fle, transfer it to your R project working directory as discussed in 7 Chap. 2. If you inspect the Corporate Reputation Data.csv fle in a text editor, it should appear as in the screenshot in . Fig. 3.3. Note that this .csv fle uses semicolons instead of commas to separate variable names and values.

In . Fig. 3.3, we see that this sample data has a header row consisting of the variable names (columns). In addition, the semicolon (;) is used as a separator

Note: Use **?read.csv()** for the full documentation Source: authors' own table

..      **Fig. 3.3** The Corporate Reputation Data.csv fle viewed in a text editor. (Source: authors' screenshot from R)

character, and the missing values are coded as −99. If you wish to import this fle to the global environment, you can use the **read.csv()** function, specifying the arguments *fle* **= "Corporate Reputation Data.csv"**, *header* **= TRUE**, and *sep* **= ";"** and assigning the output to the **corp\_rep\_data** variable:

```
# Load the corporate reputation data
corp_rep_data <- read.csv(fle = "Corporate Reputation Data.
csv", header = TRUE, sep = ";")
```
When clicking on the **corp\_rep\_data** object in the environment panel of RStudio, the source window opens at the top left of the screen (. Fig. 3.4).

#### >**Important**

Inspect the loaded data to ensure that the correct numbers of columns (indicators), rows (observations or cases), and column headers (indicator names) appear in the loaded data. Note that SEMinR uses the asterisk ("\*") character when naming interaction terms as used in, for example, moderation analysis, so please ensure that asterisks are not present in the indicator names. Duplicate indicator names will also cause errors in SEMinR. Finally, **missing values** should be represented with a missing value indicator (such as −99, which is commonly used), so they can be appropriately identifed and treated as missing values.

We encourage you to follow the above steps to download and read a dataset. Alternatively, you can also access that particular dataset directly from SEMinR. To help demonstrate its features, SEMinR comes bundled with two datasets, the corporate reputation dataset (Hair et al., 2022; **corp\_rep\_data**) and the European

..      **Fig. 3.4** Inspecting the **corp\_rep\_data** object. (Source: authors' screenshot from RStudio)

Customer Satisfaction Index (ECSI) dataset (Tenenhaus, Esposito Vinzi, Chatelin, & Lauro, 2005; **mobi**). When the SEMinR library has been loaded to the global environment (**library(seminr)**), the data are accessible by simply calling the object names (**corp\_rep\_data** or **mobi**).

Whichever way you have loaded the **corp\_rep\_data**, we can now inspect the dataset by using the **head()** function. **head()** is a useful function that outputs the frst few felds of an object:

```
# Show the frst several rows of the corporate reputation data
head(corp_rep_data)
```
It is clear from inspecting the head of the **corp\_rep\_data** object (. Fig. 3.5) that the fle has been loaded correctly and has the value "-99" set for the missing values. With the data loaded correctly, we now turn to the measurement model specifcation.

#### **3.3 Specifying the Measurement Models**

Path models are made up of two elements: (1) the measurement models (also called outer models in PLS-SEM), which describe the relationships between the latent variables and their measures (i.e., their indicators), and (2) the structural model (also called the inner model in PLS-SEM), which describes the relationships

between the latent variables. We begin with describing how to specify the **measurement models**.

The basis for determining the relationships between constructs and their corresponding indicator variables is measurement theory. A sound measurement theory is a necessary condition to obtain useful results from any PLS-SEM analysis. Hypothesis tests involving the structural relationships among constructs will only be as reliable or valid as the construct measures.

SEMinR uses the **constructs()** function to specify the list of all construct measurement models. Within this list, we can then defne various constructs:

Source: authors' own table

The **constructs()** function compiles the list of constructs and their respective measurement model defnitions. We must supply it with any number of individual **composite()**, **interaction\_term()**, or **higher\_composite()** constructs using their respective functions. Note that neither a dataset nor a structural model is specifed in the measurement model stage, so we can reuse the measurement model object across different datasets and structural models.

The **composite()** function describes the measurement model of a single construct and takes the arguments shown in . Table 3.3.

SEMinR strives to make specifcation of measurement items shorter and cleaner using **multi\_items()**, which creates a vector of multiple measurement items with similar names or **single\_item()** that describes a single measurement item. For example, we can use **composite()** for PLS path models to describe the refectively measured *COMP* construct with its indicator variables *comp\_1*, *comp\_2*, and *comp\_3*: **composite("COMP", multi\_items("comp\_", 1:3),** *weights* **= mode\_A)**; 7 Sect. 3.5 contains explanations of mode A and mode B. When no measurement weighting scheme is specifed, the argument default is set to **mode\_A**. Similarly, we can use **composite()** to defne the single-item measurement model of *CUSA* as **composite("CUSA", single\_item("cusa"))**. Combining the four measurement models within the **constructs()** function, we can defne the measurement model for the simple model in . Fig. 3.2. Note: If an error occurs, make sure you used the **library(seminr)** command in R to load the SEMinR package before executing the program code.

```
# Create measurement model
simple_mm <- constructs(
 composite("COMP", multi_items("comp_", 1:3)),
 composite("LIKE", multi_items("like_", 1:3)),
 composite("CUSA", single_item("cusa")),
 composite("CUSL", multi_items("cusl_", 1:3)))
```
The program code above facilitates the specifcation of standard measurement models. However, the **constructs()** function also allows specifying more complex models, such as interaction terms (Memon et al., 2019) and higher-order constructs (Sarstedt et al., 2019). We will discuss the **interaction\_term()** function for specifying interactions in more detail in 7 Chap. 8.

#### **3.4 Specifying the Structural Model**

With our measurement model specifed, we now specify the **structural model**. When a structural model is being developed, two primary issues need to be considered: the sequence of the constructs and the relationships between them. Both issues are critical to the concept of modeling because they represent the hypotheses and their relationships to the theory being tested.

In most cases, researchers examine linear independent–dependent relationships between two or more constructs in the path model. Theory may suggest, however, that model relationships are more complex and involve mediation or moderation relationships. In the following section, we briefy introduce these different relationship types. In 7 Chaps. 7 and 8, we explain how they can be estimated and interpreted using SEMinR.

SEMinR makes structural model specifcation more human readable, domain relevant, and explicit by using these functions:

The simple model in . Fig. 3.2 has fve relationships. For example, to specify the relationships from *COMP* and *LIKE* to *CUSA* and *CUSL*, we use the *from* and *to* arguments in the path function: **paths(from = c("COMP", "LIKE"), to = c("CUSA", "CUSL")).**

```
# Create structural model
simple_sm <- relationships(
 paths(from = c("COMP", "LIKE"), to = c("CUSA", "CUSL")),
 paths(from = c("CUSA"), to = c("CUSL")))
```
Note that neither a dataset nor a measurement model is specifed in the structural model stage, so we can reuse the structural model object **simple\_sm** across different datasets and measurement models.

#### **3.5 Estimating the Model**

After having specifed the measurement and structural models, the next step is the **model estimation** using the **PLS-SEM algorithm**. For this task, the algorithm needs to determine the scores of the constructs that are used as input for (single and multiple) partial regression models within the path model. After the algorithm has calculated the construct scores, the scores are used to estimate each partial regression model in the path model. As a result, we obtain the estimates for all relationships in the measurement models (i.e., the indicator weights/loadings) and the structural model (i.e., the path coeffcients).

The setup of the measurement models depends on whether the construct under consideration is modeled as refective or formative. When a **refective measurement model** is assumed for a construct, the indicator loadings are typically estimated through **mode A**. It estimates the relationship from the construct to each indicator based on a refective measurement model that uses bivariate regressions (i.e., a single indicator variable represents the dependent variable, while the construct score represents the independent variable). As a result, we obtain correlations between the construct and each of its indicators (i.e., **correlation weights**), which become the **indicator loadings**. In contrast, when a **formative measurement model** is assumed for a construct, the indicator weights are typically estimated using multiple regression. More specifcally, the measurement model estimation applies PLS-SEM's **mode B**, in which the construct represents a dependent variable and its associated indicator variables are the multiple independent variables. As a result, we obtain **regression weights** for the relationships from the indicators to the construct, which represent the **indicator weights**. While the use of mode A (i.e., correlation weights) for refective measurement models and mode B (i.e., regression weights) for formative measurement models represents the standard approach to estimate the relationships between the constructs and their indicators in PLS-SEM, researchers may choose a different mode per type of measurement model in special situations (see also Hair et al., 2022; Rigdon, 2012).

Structural model calculations are executed as follows. The partial regressions for the structural model specify an endogenous construct as the dependent variable in a regression model. This endogenous construct's direct predecessors (i.e., latent variables with a direct relationship leading to the specifc endogenous construct) are the independent variables in a regression used to estimate the **path coeffcients**. Hence, there is a partial regression model for every endogenous construct to estimate all the path coeffcients in the structural model.

All partial regression models are estimated by the PLS-SEM algorithm's iterative procedures, which comprise two stages. In the frst stage, the construct scores are estimated. Then, in the second stage, the fnal estimates of the indicator weights and loadings are calculated, as well as the structural model's path coeffcients and the resulting R2 values of the endogenous latent variables. Appendix A of this textbook provides a detailed description of the PLS-SEM algorithm's stages (see also Lohmöller, 1989).

To estimate a PLS path model, algorithmic options and argument settings must be selected. The algorithmic options and argument settings include selecting the structural model path weighting scheme. SEMinR allows the user to apply two structural model **weighting schemes**: (1) the **factor weighting scheme** and (2) the **path weighting scheme**. While the results differ little across the alternative weighting schemes, path weighting is the most popular and recommended approach. This weighting scheme provides the highest R2 value for endogenous latent variables

..      **Table 3.4** Arguments for the **estimate\_pls()** function

Source: authors' own table

and is generally applicable for all kinds of PLS path model specifcations and estimations. Chin (1989) provides further details on the different weighting schemes available in PLS-SEM.

SEMinR uses the **estimate\_pls()** function to estimate the PLS-SEM model. This function applies the arguments shown in . Table 3.4. Please note that arguments with default values do not need to be specifed but will revert to the default value when not specifed.

We now estimate the PLS-SEM model by using the **estimate\_pls()** function with arguments *data* **= corp\_rep\_data**, *measurement\_model* **= simple\_mm**, *structural\_model* **= simple\_sm**, *inner\_weights* **= path\_weighting**, *missing* **= mean\_replacement**, and *missing\_value* **= "-99"** and assign the output to **corp\_rep\_simple\_model**.

```
# Estimate the model
corp_rep_simple_model <- estimate_pls(data = corp_rep_data,
 measurement_model = simple_mm,
 structural_model = simple_sm,
 inner_weights = path_weighting,
 missing = mean_replacement,
 missing_value = "-99")
```
..      **Fig. 3.6** The estimated simple corporate reputation model. (Source: authors' screenshot from RStudio)

Note that the arguments for *inner\_weights*, *missing*, and *missing\_value* can be omitted if the default arguments are used. This is equivalent to the previous code block:

```
# Estimate the model with default settings
corp_rep_simple_model <- estimate_pls(data = corp_rep_data,
 measurement_model = simple_mm,
 structural_model = simple_sm,
 missing_value = "-99")
```
When the PLS-SEM algorithm has converged, the message "Generating the seminr model. All 344 observations are valid" will be shown in the console window (. Fig. 3.6).

#### **3.6 Summarizing the Model**

Once the model has been estimated, we can summarize the model and generate a report of the results using the **summary()** function, which is used to extract the output and parameters of importance from an estimated model. SEMinR supports the use of **summary()** for the **estimate\_pls()**, **bootstrap\_model()**, and **predict\_pls()** functions.

The **summary()** function applied to a SEMinR model object produces a **summary.seminr\_model** class object, which can be stored in a variable and contains

Source: authors' own table

the sub-objects shown in . Table 3.5 that can be inspected using the **\$** operator (e.g., **summary\_simple\_corp\_rep\$meta**). These sub-objects relate to model estimates, which serve as a basis for the assessment of the measurement and structural models (Hair, Risher, Sarstedt, & Ringle, 2019).

```
# Summarize the model results
summary_simple_corp_rep <- summary(corp_rep_simple_model)
# Inspect the model's path coeffcients and the R^2 values
summary_simple_corp_rep$paths
# Inspect the construct reliability metrics
summary_simple_corp_rep$reliability
```
..      **Fig. 3.7** Inspecting the summary report elements. (Source: authors' screenshot from RStudio)

. Figure 3.7 shows the results stored in the **summary\_simple\_corp\_rep\$paths** and **summary\_simple\_corp\_rep\$reliability** sub-objects.

#### **3.7 Bootstrapping the Model**

PLS-SEM is a nonparametric method – thus, we need to perform **bootstrapping** to estimate standard errors and compute confdence intervals. Bootstrapping will be discussed in more detail in 7 Chaps. 5 and 6, but for now, we introduce the function and arguments.

SEMinR conducts high-performance bootstrapping using parallel processing, which utilizes the full performance of the central processing unit (CPU). The **bootstrap\_model()** function is used to bootstrap a previously estimated SEMinR model. This function applies the arguments shown in . Table 3.6.

In our example, we use the **bootstrap\_model()** function and specify the arguments *seminr\_model* **= corp\_rep\_simple\_model**, *nboot* **= 1000**, *cores* **= NULL**, *seed* **= 123**. In this example, we use 1,000 bootstrap subsamples. However, the fnal result computations should draw on 10,000 subsamples (Streukens & Leroi-Werelds, 2016). These computations may take a short while (i.e., the R program remains idle). We frst assign the output of the bootstrapping to the **boot\_simple\_corp\_rep** variable. We then summarize this variable, assign-

Source: authors' own table

Source: authors' own table

ing the output of **summary()** to the **sum\_boot\_simple\_corp\_rep** variable. The summarized bootstrap model object (i.e., **sum\_boot\_simple\_corp\_rep**) contains the elements shown in . Table 3.7, which can be inspected using the **\$** operator.

```
# Bootstrap the model
boot_simple_corp_rep <- bootstrap_model(seminr_model = corp_
rep_simple_model,
 nboot = 1000,
 cores = NULL,
 seed = 123)
# Store the summary of the bootstrapped model
sum_boot_simple_corp_rep <- summary(boot_simple_corp_rep)
# Inspect the bootstrapped structural paths
sum_boot_simple_corp_rep$bootstrapped_paths
# Inspect the bootstrapped indicator loadings
sum_boot_simple_corp_rep$bootstrapped_loadings
```
. Figure 3.8 shows the results of the bootstrap procedure for the path coeffcients and indicator loadings. Note that bootstrapping is a random process, and your results might be slightly different from those presented here.

#### **3.8 Plotting, Printing, and Exporting Results to Articles**

When model estimation, evaluation, and analysis have been completed, it is often necessary to export the results generated in R to a report, such as an Apache OpenOffice writer document (.odt) or Microsoft PowerPoint presentation (.ppt or .pptx). Throughout this book, we provide screenshots for demonstrating the code outputs to the console in RStudio. However, we do not recommend this method to be used for copying and pasting results to research reports or articles. Instead, we recommend exporting tables and matrices to .csv files, which can be imported into documents or presentations, and that figures are exported to .pdf files to ensure the best print quality. In this section, we demonstrate how to best export results for high print quality and readability.

The **write.csv()** function takes an object from the global environment 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 *fle* 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* **= sum\_boot\_simple\_corp\_rep\$bootstrapped\_loadings** and *fle* **= "boot\_loadings. csv"**.

..      **Fig. 3.8** Bootstrapped structural paths and indicator loadings. (Source: authors' screenshot from RStudio)

```
# Write the bootstrapped paths object to csv fle
write.csv(x = sum_boot_simple_corp_rep$bootstrapped_loadings,
 fle = "boot_loadings.csv")
```
Once the boot\_loadings.csv fle has been saved into the working directory, we can open it with Apache OpenOffce Calc, Microsoft Excel, or other spreadsheet software. These spreadsheet software applications enable formatting and editing the table to produce high-quality tables in reports. We followed this procedure to create . Table 3.8 of bootstrapped indicator loadings for the simple corporate reputation model.

Next, we discuss how to generate high-quality fgures from the SEMinR results. First, we generate a sample plot for export from RStudio. To do this, we use a sub-

<sup>67</sup> **3**

..      **Table 3.8** Export of bootstrapped indicator loadings from SEMinR