An Introduction to Structural Equation Modeling for Ecology & Evolutionary Biology

Course Description

Many problems in ecology and evolutionary biology require understanding of the relationships among variables and examining their relative influences and responses. For example, over the last few decades ecologists have been trying to quantify the relative importance of top-down control by predation and herbivory vs. bottom-up control by nutrients and recruitment driving food web dynamics. Rather than arguing which of these forces are more important, we can examine the relative importance of each and how these forces interact to influence food web dynamics.

Structural Equation Modeling (SEM) or path analysis is a multivariate technique that can test for the nature and magnitude of direct and indirect effects of multiple interacting factors. SEM is an approach that interprets information about the observed correlations among the traits of organisms or groups of organisms in order to evaluate complex causal relationships. It is a rich technique that is particularly well suited for large-scale observational community or population data sets. Its intuitive connection to how we conceive of our study systems makes it a powerful and useful technique for ecologists and evolutionary biologists. The goal of this workshop is to familiarize ecologists the basic techniques of SEM using the ‘lavaan’ package in R.

Material Covered
See also the pdfs in this folder for more topic-specific readings.

Day 1 – Lectures: What is SEM? How can it be part of your research program? pdf

       SEM as a process: Creating multivariate causal models pdf
       Fitting piecewise models pdf
       Exercises: Creating causal conceptual models
       Piecewise model creation r file, data
       Readings: Grace 2010 (overview), Whalen et al. 2013 (example) (note: pdfs password protected, email me for info if you’ve lost it)
       Optional Reading: Matsueda 2012 (history), Pearl 2012a (history of causality)

Day 2 – Lectures: Fitting Observed Variable models with covariance structures pdf
       What does it mean to evaluate a multivariate hypothesis?pdf
       ANCOVA revisited & Nonlinearities pdf
       Exercises: Fitting observed variable structural equation models in R New R Files and Data
       Readings: Grace and Bollen 2005, Shipley 2004, Lefcheck 2016
       Optional Reading: Pearl 2012b, Pearl 2009 (causality)

Day 3 – Lecture: Multigroup models pdf
       Latent Variable models pdf
       Exercises: Multigroup analysis and the introduction of the latent variable R Files and Data
       Reading: Mancera et al. 2005
       Optional Reading: Grace and Jutila 1999, Bollen and Pearl 2012

Day 4 – Lecture: Composite Variables pdf
       Prediction using SEMs pdf
       Dealing with Clustered Data, Space, and Time pdf
       How to Fool Yourself with SEM (sensu Kline) pdf
       Exercises: Composites & Other Advanced Techniques R Files and Data
       Reading: Oberski 2014, Grace et al. 2010, Shipley 2009 [R appendix]

Day 5 – Open Lab & Presentations

Before the Class

Hello everyone! I’m looking forward to our upcoming journey into the wild world of Structural Equation Modeling together. Before the class begins, I want to make sure you all are prepared so that you can get the most out of it and to have you work through this preclass-excercise and tutorial.

The course is going to be a mixture of lecture and hands-on exercises. Aside from model building and identification exercises, everything else will be in R. I am going to assume that you have at least basic proficiency in R. You will need basic proficiency in order to work through the the class. What does basic proficiency mean? I expect that

0) You have R installed on your computer and be able to access help files.
1) You can install and load new libraries, as shown in the preclass tutorial.
2) You are able to load in data files as shown in the preclass tutorial.
3) You can plot a relationship between two variables from your data.
4) You can perform a basic linear regression, and get summary statistics for parameter fits and F-tests.

But I don’t know R!
If you cannot do the things in the list above, there are a few remedies. Note, you *must* do the following. As this is a short, sharp, hands-on workshop, if you are not able to work in R, you won’t get nearly as much out of the workshop as you would have otherwise.

First, I find the best way to learn something is through an interactive tutorial. Fortunately, someone has developed one for R, called Swirl! So, run, do not walk, on over to their website and go through the process to install R and Swirl. Then, go through the “R Programming” module and the “Data Analysis” module at bare minimum (see here if they don’t load automatically). The “Regression Models” module will also likely be very helpful, but

If you want more resources, I encourage you to visit one (or more) of the following additional tutorials (I’m listing several, as I’ve found that different tutorials work more or less well for different people – so take a look at them and see what works for you.)

http://www.r-tutor.com/r-introduction

http://www.nceas.ucsb.edu/files/scicomp/Dloads/RProgramming/BestFirstRTutorial.pdf
http://www.youtube.com/user/wildsc0p

Great, I went through Swirl – now what?
Afterwards, make sure you work through the preclass tutorial.

In the tutorial, you’ll be asked to install the following libraries, as we’ll be using them throughout the course:

lavaan
piecewiseSEM
dplyr
ggplot2
AICcmodavg
car
ggm
semPlot
semTools
lavaan.survey
rethinking
blavaan

For the exercises, we will work on some common datasets.

However, I’ll also provide some time to begin working with your own data. If you do not have data to work with, don’t worry. I have a few public data sets from kelp forests in Santa Barbara and fouling communities in Bodega Bay. There are also some good sets in the nceas data catalog. However, I highly encourage you to bring your own data as you’ll get a much deeper understanding working with SEM if you know the data. You’re also welcome to share data sets with each other – who knows, someone may figure out that problem you’ve been hitting your head on for the past few months!

If you have any further questions, please don’t hesitate to contact me!

Software

Additional Useful Links

Reading

Bollen, K.A. and Pearl, J. (2012) Eight myths about causality and Structural Equation Models. In Handbook of Structural Equation Modeling. R. Hoyle, ed. [pdf]

Byrnes, J.E., Reed, D.C., Cardinale, B.J., Cavanaugh, K.C., Holbrook, S.J. & Schmitt, R.J. (2011). Climate driven increases in storm frequency simplify kelp forest food webs. Global Change Biology, 17: 2513-2524.[pdf]

Grace, J.B. (2010) Structural Equation Modeling for Observational Studies. Journal of Wildlife Management, 72:14-22 [pdf]

Grace J.B., Anderson TM, Olff H, Scheiner SM (2010) On the specification of structural equation models for ecological systems. Ecological Monographs, 80, 67-87. [pdf]

Grace J.B., Bollen KA (2005) Interpreting the Results from Multiple Regression and Structural Equation Models. Bulletin of the Ecological Society of America, 86, 283-295.[pdf]

Grace, J.B. & Jutila, H. (1999). The relationship between species density and community biomass in grazed and ungrazed coastal meadows. Oikos, 398-408. [pdf]

Mancera, J.E., Meche, G.C., Cardona-Olarte, P.P., Castañeda-Moya, E., Chiasson, R.L., Geddes, N.A., et al. (2005). Fine-scale spatial variation in plant species richness and its relationship to environmental conditions in coastal marshlands. Plant Ecol., 178, 39-50. [pdf]

Matsueda, R.L. (2012) Key advances in the history of structural equation modeling. In Handbook of Structural Equation Modeling. R. Hoyle, ed. [pdf]

Pearl, J. (2009) Defending the causal interpretation of SEM. In Causality, 2nd Ed. [pdf]

Pearl, J. (2012) The causal foundations of Structural Equation Modeling. In Handbook of Structural Equation Modeling. R. Hoyle, ed. [pdf]

Shipley, B. (2004) Analysing the allometry of multiple interacting traits. Perspect Plant Ecol, 6, 235-241. [pdf]

Shipley, B. (2009) Confirmatory path analysis in a generalized multilevel context. Ecology, 90: 363-368.[pdf] [R appendix]

See also the pdfs in this folder for more topic-specific readings.

Useful Books

James B. Grace. 2006. Structural Equation Modeling and Natural Systems. Cambridge University Press. [amazon]

Ken A. Bollen. 1989. Structural Equations with Latent Variables. Wiley Press.[amazon]

Rex B. Kline. 2010. Principles and Practice of Structural Equation Modeling. The Guilford Press. [amazon]

Bill Shipley. 2000. Cause and Correlation in Biology. Cambridge University Press. [amazon]

Rick H. Holyle, ed. 2012. Handbook of Structural Equation Modeling. The Guilford Press. [amazon]

1 Comment

  1. Piecewise structural equation modeling in ecological research | sample(ECOLOGY)
    July 6, 2014

    […] scratched the surface. For an excellent introductory resource to SEM, see Jarrett Byrne’s SEM course website–and take the course if you ever get a chance, its fantastic! I hope I’ve done this […]