1 Preface

Structural equation modeling is among the fastest growing statistical techniques in the natural sciences, thanks in large part to new advances and software packages that make it broadly applicable and easy to use.

This book is meant to be an approachable and open-source guide to the theory, math, and application of SEM. It integrates code for the R software for statistical computing from popular packages such as lavaan and piecewiseSEM. Each chapter ends with worked examples from the published literature.

Moreover, as the author of the piecewiseSEM package, this format allows me to document newly-deployed functionality in the package, such as the addition of categorical variables, multigroup analysis and composite variables, new forms of coefficient standardization, and updates to model R2s.

Check back often, as this book is a “living resource:” as new functionality is added and bugs uncovered and fixed, they will be described in detail here (with worked examples where possible).

I would also say that this book is not a peer-reviewed resource, and has been somewhat cobbled together over late night coding sessions prepping for morning lectures. So please take everything here with a grain of salt, and do not hesitate to reach out if you find an errors, typos, or other issues.

I am, however, indebted to Christopher Shannon, Audrey Barker-Plotkin, Scott Meyers, Liangzhe Chen, and others for their careful reading and for providing excellent editorial and technical corrections.

Happy coding!