fec12269-sup-0002-AppendixS1

advertisement
1
Appendix S1. A Brief Introduction to Structural Equation Modeling.
Supporting Online Material for:
Title: Understanding productivity – richness relationships: causal networks as an alternative to
bivariate plots.
Authors: Grace, James B; Adler, Peter; Harpole, W; Borer, Elizabeth; Seabloom, Eric
Purpose and General References
This appendix is designed for those not yet familiar with structural equation modeling, but who
might wish to learn more about the fundamental logic and procedures. There is a rich body of
literature on SEM, but the majority of general treatments and specific applications relate to the
human sciences. We find that ecologists and other natural scientists grasp the principles more
readily when illustrated using familiar examples. Here we provide a brief overview and point the
reader to just a few of the most accessible references.
We encourage those interested in seeing specific types of examples to perform an internet search
for “structural equation modeling” plus their topic of interest. For example, one might search for
“structural equation modeling and invasive species”. One might also try searching for “structural
equation modeling and climate change”. Here they will find quite a different body of examples,
much of which comes from economics and environmental sociology. General references from
the natural sciences include Shipley (2000), Grace (2006), and a range of examples are presented
in Pugesek et al. (2003). An entry-level general reference from the human sciences is Kline
(2011), while a more exhaustive treatment of methods is covered in Hoyle (2012).
When to Use SEM and Why
SEM is a scientific framework for representing causal hypotheses and evaluating them with data.
It is fundamentally distinct from classical statistical analysis (though it uses statistical tools). We
think the basic rationale for using SEM first requires a recognition that conventional statistical
analysis is not designed for either the study of causal hypotheses or systems of variables. One
may question the first part of this statement by asking, “But what about the use of ANOVA with
randomized experiments?” Classical ANOVA does permit causal attribution when isolation and
physical control can be achieved; it does not, however, permit one to investigate underlying
mechanistic possibilities. Several papers illustrate how the use of SEM with experimental data
can yield much deeper insights into mechanisms, while evaluating system-level responses to
treatments (Grace et al. 2009, Whalen et al. 2013). Regarding the second part of our statement
about statistics, conventional statistical analyses are based on the general equation Y = f(X),
where Y is some response or vector of responses and X some list of predictors (e.g., multiple
regression). SEM is based on the equation Y = f(X, Y). By including Ys as predictors of Ys,
networks of relationships can be modeled. Such an equational framework opens up opportunity
for the incorporation of more scientific knowledge in hypotheses, as well as a method for digging
deeper into the reasons for observed linkages in models.
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
2
We can develop additional motivation for using SEM by asking two questions. First, “What
percentage of the time are scientists interested in hypotheses involving cause-effect relationships,
as opposed to descriptive analyses?” Second, “What percentage of the time are quantitative
analyses designed to test cause-effect hypotheses (as opposed to estimating quantities or
associations)?” We think the answer to the first question for most scientists will be some large
number, while the answer to the second question will be some small number. This leads to the
conclusion, as one reviewer of this paper put it, (paraphrasing) “Ecologists try to use simplistic
methods to study complex hypotheses, and as a result, our ability to develop stronger ecological
theory falters.”
SEM Procedures and a Simple Illustration
For those getting started with SEM, Grace et al. (2012) have published guidelines for what to
consider and how to conduct SEM studies, as well as pointers to additional information. An
open-access link can be found at http://www.esajournals.org/doi/abs/10.1890/ES12-00048.1.
One might also look at www.structuralequations.org for tutorials and other resources.
Reviewers of our paper (Grace et al. 2014) asked us to provide a small illustration here so the
reader can see more explicitly how one might perform SEM. For this purpose we confine
ourselves to a simple 3-variable illustration abstracted from a larger study published by Grace
and Keeley (2006).
The ecological situation in this example deals with vegetation recovery following wildfires.
Following major wildfires in California in 1993, Keeley and Associates established 90 plots
throughout the landscape to examine post-fire recovery of the ecosystem. Variables measured
included (1) pre-burn age of dominant woody species and (2) post-fire vegetation cover the
spring following fire. An initial observation made by the investigators was a negative correlation
between stand age before fire and vegetation recovery following fire (Figure S1-1).
A number of hypotheses were suggested to explain the
observed bivariate relationship. To evaluate those
hypotheses, SEM was used. Here, we construct a causal
diagram (Figure S1-2A) to represent some of the ideas
considered. The first and most prominent idea was that
older stands possessed more fuel than younger stands
and would have burned hotter. The second idea was that
older stands might have a partially depleted seedbank
for the herbaceous species that would primarily
determine immediate post-fire recovery.
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
3
Testing hypotheses about the mechanisms that connect two system properties is a classic
problem in SEM and is referred to as the “test of mediation” (MacKinnon 2007). Since Keeley
and Associates estimated fire severity based on post-fire remains, it is possible to ask whether the
variations in fire severity observed can explain the observed relation between stand age and
vegetation cover. The three possible outcomes from a test of mediation are (a) no mediation,
where the hypothesized mediator is not related to either the ultimate cause (stand age) or the
ultimate response (veg. cover), (b) full mediation, where the mediator completely explains the
relation between driver and response, and (c) partial mediation, where the mediator explains part
of the relation between driver and response, but some addition mechanism is implicated as well
(the case implied by panel B in Figure S1-2).
Table S1-1. Example: Observed correlations among observed variables.
stand age
veg. cover
fire severity
stand age
1.00
-0.35
0.45
veg. cover
fire severity
1.00
-0.44
1.00
Consideration of the matrix of correlations among observed variables (Table S1-1) provides us
with one way of thinking about the problem. Using conventional procedures, all three
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
4
correlations between variables are statistically significant. SEM can then be used to see how the
observed patterns in the data match those implied by the model. Before we show how that can be
accomplished, we briefly summarize some elements of the causal inference side of SEM.
As Shipley (2000), Grace (2006), Pearl (2009), and Grace et al. (2012) suggest, there are a
number of principles that should be honored if we are to claim any causal inferences. These are
separate from any statistical assumptions, which depend on equational specifications, estimation
methods, and means of arriving at probability statements. Here we summarize a few of those
principles.
1) Achieving a confident causal understanding requires a series of studies that challenge and
build on each other (e.g., Grace 2006, Chapter 10). Any SEM application will contain
some assumptions that are not explicitly tested in that analysis, as well as some that are.
2) SEM results should not be taken as proof of causal claims, but instead as evaluations of
causal hypotheses.
3) A causal effect is defined by an anticipated response in the variable at the head of an
arrow if we were able to directly manipulate the variable at the base of an arrow.
4) Causes precede effects. This means we really should be making measurements at
appropriate times to best capture the causal relationships. Simultaneous measurements
are commonly used in SEM analyses, but additional assumptions relating to temporal
consistency must be invoked.
5) Variables not directly connected by a single or double-headed arrow in a model are
presumed to be conditionally independent, that is, to have no significant residual
relationship. This is a fundamental requirement for network hypotheses to be consistent
with patterns in data. When two unconnected variables do not satisfy this criterion, it
means there is some other process that should be included in the model.
6) A fundamental operation in SEM is the test of mediation. For this test we hypothesize
that the reason one variable influences another can be explained by a third variable lying
along the causal path. If the effect of one variable on another can be expressed as an
indirect effect through an intervening variable, then that intervening variable may
constitute the causal mediator.
7) Unbiased causal estimates require an avoidance of confounding. Confounding occurs
when processes unrelated to a causal effect of interest influence both cause and effect in a
model. In such cases, the confounding factor or some measure of it needs to be included
in the model to control for its influence.
Now, given some set of ideas, as in our causal diagram, we can develop a SE model based on the
available data (Figure S1-2B). For specification purposes, we can represent the relationships in
the model with two equations. These are:
fire severity = f(stand age)
(equation 1)
veg. cover = f(fire severity, stand age).
(equation 2)
There are several different ways we might estimate parameters for this system of equations. We
first demonstrate the method of modeling covariances, the dominant approach used in SEM
software packages.
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
5
For simplicity, we assume linear Gaussian relations; thus, there are single parameters describing
each connection in the model.
fire severity = b11*stand age
(equation 3)
veg. cover = b21*fire severity + b22*stand age
(equation 4)
For our analysis, we need to reconcile the bivariate correlations in Table S1-1 with the relations
implied by Figure S1-1B. To do this requires a consideration of partial effects (e.g., partial
correlations or partial derivatives). Simply described, the total relation between cover and stand
age consists of partial components of the indirect path through fire severity and the direct path
representing influences unrelated to fire severity.
In Box S1-1 we give the R code for estimating model parameters for the model in Figure S1-2B
using the “lavaan” package, which implements matrix-based SEM procedures (Rosseel 2012).
We can also arrive at similar estimates by solving the model as separate equations using
regression procedures using the raw values for the variables. A comparison between the matrixbased approach to estimation and piecewise estimation using regression procedures is discussed
further in Grace et al. (2012). Here, our objective is to demonstrate the estimation of a model
using lavaan. A video tutorial giving a first introduction to lavaan can be found at
http://www.structuralequations.com/LavaanTutorials.html. Additional tutorials can also be found
at the lavaan development site and at Jarrett Byrnes’ site http://jarrettbyrnes.info/sem.shtml.
##### Box S1-1. Demonstration of R Script for SEM analysis
##### Here we use the R package “lavaan”
library(lavaan)
### Create input matrix of correlations
lower <- '
1.0
-0.35
1.0
0.45 -0.44 1.0 '
demo.cov <- getCov(lower, names = c("age", "cover", "firesev"))
### MODEL 1
# Specify model
model1 <- 'firesev ~ age
cover ~ firesev + age'
# Estimate model parameters
fit1 <- sem(model1, sample.cov = demo.cov, sample.nobs = 90)
# Request output
summary(fit1, rsq=T)
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
6
Results
Results that are generated from the initial analysis are shown in Box S1-2. Before worrying
about interpreting results, we must consider whether our initial model is consistent with the data
and whether it contains unnecessary linkages. To do this, we first focus on overall model fit.
Overall fit is typically represented by some summary of the total discrepancies between modelimplied data relations and observed data relations. In this case, the Model Chi-square is
presented. A model chi-square of zero represents perfect fit. This is the expected value for
models that include all possible linkages, as in Figure S1-2B. In such SEM analyses, a model
probability statement is computed from the chi-square and in a perfectly-fitting model, the model
p-value is 1.0. Those new to SEM should not that we seek models that are NOT discrepant from
our theory-based models and thus, we expect large p-values. This is quite the opposite from the
typical use of p-values in null-hypothesis testing.
##### Box S1-2. Results output for Model 1.
lavaan (0.5-15) converged normally after
11 iterations
Number of observations
90
Overall Model Fit:
Estimator
Minimum Function Test Statistic
Degrees of freedom
P-value (Chi-square)
Parameter estimates:
Estimate
Regressions:
firesev ~
age
0.450
cover ~
firesev
-0.354
age
-0.191
ML
0.000
0
0.000
Std.err
Z-value
P(>|z|)
0.094
4.780
0.000
0.104
0.104
-3.404
-1.831
0.001
0.067
R-Square:
firesev
cover
0.203
0.223
In examining the results for Model 1, the question then becomes one of whether all included
linkages are supported by the data. The P(>|z|) for cover ~ firesev of 0.067 suggests the
possibility that this linkage may not be needed. In conventional SEM practice, the way we test
that idea is not by relying on the p-value associated with an individual parameter, but by
comparing two models, one with the link included and one with it omitted. Therefore, we present
results for a simpler model, Model 2 in Box S1-3. Since we have not yet decided whether Model
2 is preferable to Model 1, we only examine model fit statistics for now.
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
7
##### Box S1-3. R Script for Model 2.
### MODEL 2
# Specify model
model2 <- 'firesev ~ age
cover ~ firesev'
# Estimate model parameters
fit2 <- sem(model2, sample.cov = demo.cov, sample.nobs = 90)
# Request output
summary(fit2, rsq=T)
##### Box S1-4. Model fit indices for Model 2.
lavaan (0.5-15) converged normally after
12 iterations
Number of observations
90
Overall Model Fit:
Estimator
Minimum Function Test Statistic
Degrees of freedom
P-value (Chi-square)
ML
3.293
1
0.070
Model test baseline model:
Minimum Function Test Statistic
Degrees of freedom
P-value
43.023
3
0.000
User model versus baseline model:
Comparative Fit Index (CFI)
Tucker-Lewis Index (TLI)
0.943
0.828
Information Measures:
Number of parameters estimated
Akaike (AIC)
Bayesian (BIC)
Sample-size adjusted Bayesian (BIC)
4
731.480
741.479
728.855
Root Mean Square Error of Approximation:
RMSEA
90 Percent Confidence Interval
P-value RMSEA <= 0.05
0.000
0.160
0.365
0.101
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
8
Model fit statistics presented in Model S1-4 represent only a select few out of the many measures
that can be calculated. For an introduction discussion of fit measures, we refer the reader to Kline
(2011). In this particular case, we can note that for the simpler model that omits a direct link
from age to cover (Model 2), the model P-value is still greater than the usual minimum of 0.05
and the P-value for the RMSEA test of close fit is 0.10, also above the minimum. These two
measures alone lend support for choosing Model 2 over Model 1. More direct tests can be
performed by directly comparing the two models, as shown in Box S1-5. The results presented
here provide additional weight in favor of Model 2 based on a small difference in AIC and BIC
between models, as well as chi-square criteria summarizing log-likelihood ratio tests.
##### Box S1-5. Direct comparison of Models 1 and 2.
> anova(fit1, fit2)
Chi Square Difference Test
fit1
fit2
---
Df
AIC
BIC Chisq Chisq_diff Df_diff Pr(>Chisq)
0 730.19 742.69 0.0000
1 731.48 741.48 3.2928
3.2928
1
0.06958
##### Box S1-5. R script for Model 2, inputting covariances & means.
### MODEL 2 USING COVARIANCES AND MEANS
# Create input covariance matrix
lower.cov <- '
157.911236
-139.688416 1006.3789
9.423989 -22.9138
2.730250'
demo.cov.full <- getCov(lower.cov, names =c("age","cover","firesev"))
means <- c(25.56667, 69.12317, 4.565)
# Specify model
model3 <- 'firesev ~ age
cover ~ firesev'
# Estimate model parameters
fit3 <- sem(model3,
sample.cov = demo.cov.full,
sample.nobs = 90,
sample.mean = means,
meanstructure =T)
# Request output
summary(fit3, rsq=T, std=T)
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
9
Having settled on Model 2 as our preferred model, we now obtain a more complete set of results,
inputting covariances in place of just correlations and providing the sample means for the
variables, as shown in Box S1-5. Inputting covariances and means permits us to obtain intercepts
and also raw-scale parameter estimates, which we will need if we wish to do any predictions in a
scale comparable to the raw data. We can accomplish the same thing by simply providing the
raw data, but it is instructive to demonstrate that the lavaan program is actually working from
data summaries when using matrix methods.
Now that we have fed in the covariances and means and rerun the analysis (Box S1-5), we get
more detailed output (Box S1-6). In examining the output, it is important to recognize the
distinction between raw (unstandardized) parameters (“Estimates”) and the standardized values
(“Std.all”). The raw estimates are the ones that we will use in developing the prediction
equations, as they express relationships in their natural units. Standardized coefficients are often
used to attempt to translate results into common units that can be compared. Additional
information regarding the interpretation of coefficients can be found in Grace and Bollen (2005).
##### Box S1-6. Full results for Model 2, including intercepts.
“Estimates” are unstandardized parameters. The “Z-value” is a maximumlikelihood version of a t-value. “P(>|z|)” is the p-value associated
with the Z-value. “Std.all” is the fully standardized parameter
estimate. Variances reported for firesev and cover are error
variances.
Estimator
Minimum Function Test Statistic
Degrees of freedom
P-value (Chi-square)
Parameter estimates:
Estimate
Regressions:
firesev ~
age
0.060
cover ~
firesev
-8.393
ML
3.297
1
0.069
Std.err
Z-value
P(>|z|)
0.012
4.832
0.000
0.454
1.820
-4.611
0.000
-0.437
8.647
12.166
0.000
0.000
1.850
3.406
Intercepts:
firesev
cover
3.039
107.435
0.351
8.831
Variances:
firesev
cover
2.144
805.028
0.320
120.007
Std.all
0.794
0.809
R-Square:
firesev
cover
0.206
0.191
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
10
Typically, we summarize some of the main results in
graphical format, as in Figure S1-3. Here, we
rearrange the diagram to emphasize our main
finding, which is that fire severity provides a
sufficient explanation for the observed relationship
between woodland stand age and post-fire vegetation
cover. We also present the standardized coefficients
on the diagram in this case, along with the R-squares.
Further information related to the full analysis can be
found in Grace and Keeley (2006).
Taking Things Further
SEM has traditionally been used to seek explanations
for the observed data, as just demonstrated. We can
think of this type of analysis as “retrospective” in
that it seeks to explain current observations based on
past events. As demonstrated in the main text in
Grace et al. (2014), SEM results can be used to
consider additional questions beyond just “what
happened?” Here we give a very basic illustration of
simulation and scenarios to suggest some of the
possibilities.
For additional explorations, we start with the prediction equations, which are built from the
results obtained from our analysis (extracted from Box S1-6) and are presented in Box S1-7. In
addition to the equations themselves, we present the error variances for the endogenous
(response) variables in the model. These provide a summary of the residuals, which are an
important part of the information obtained from the analysis.
##### Box S1-7. Prediction equations from model analysis.
# Prediction equations
firesev.pred = 3.039 + 0.060*age
cover.pred
= 107.435 -8.393*firesev.pred
# Error variances / residual variances
firesev.evar = 2.144
cover.evar
= 805.028
Using the prediction equations, along with information about the variable characteristics, we can
generalize our findings by simulating new data observations. A complete simulation of our
system can be obtained by first simulating values for stand age, then simulating values for fire
severity as a function of stand age and the expected magnitude of residual variations, and finally
simulating values for vegetation cover as a function of fire severity. Box S1-8 provides R-code
for such simulations. A comparison of sample and simulated values is shown in Figure S1-4.
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
11
##### Box S1-8.R code for simulating new values of age based off
characteristics of our sample, thus generalizing to the population.
Here, we decided to simulate new values for stand age from a negative
binomial distribution to best represent the characteristics of the
sample distribution (shown in Figure S1-4).
library(MASS) #needed for the “rnegbin” function used below
### Simulating new values to generalize our results.
# simulate values for stand age
age.mean = 25.56667
age.sd
= sqrt(157.911236) #compute std. dev. from variance of age
n = 100 #choose number of simulations to generate
set.seed(1, kind = NULL, normal.kind = NULL) #fix random start
age.sims.negb <- rnegbin(n, age.mean, theta = 4)
# simulate values for fire severity
firesev.sd <- sd(firesev)
firesev.int = 3.039
b1 = 0.060
set.seed(6, kind = NULL, normal.kind = NULL)
firesev.error.sims <- rnorm(n,0,firesev.sd)
firesev.sims0 <- rep(NA, n)
for (s in 1:n) { firesev.sims0[s] <- firesev.int + b1*age.sims.negb[s]
+ firesev.error.sims[s] }
# simulate values for vegetation cover
cover.sd <- sd(cover)
cover.int = 107.435
b2 = -8.393
set.seed(7, kind = NULL, normal.kind = NULL)
cover.error.sims <- rnorm(n, 0, cover.sd)
cover.sims0 <- rep(NA, n)
for (s in 1:n) { cover.sims0[s] <- cover.int + b2*firesev.sims0[s]
+ cover.error.sims[s] }
cover.sims0 <- (cover.sims0 - min(cover.sims0))/(max(cover.sims0)
- min(cover.sims0))*max(cover)
Grace et al. (2014) simulate results for a number of scenarios, so we provide one simple
demonstration here to illustrate the principle. For our simple example presented here, we might
wonder, “What would happen if we could use prescribed burning to reduce the severity of a
fire?” This would presumably permit us to alter the relationship between stand age and
vegetation recovery. Box S1-9 provides code for a scenario where we reduce the fire severity for
our simulated values by 50% and then simulate the predicted vegetation cover distribution that
would be produced if our prediction equation were to hold for the new situation. Figure S1-5
summarizes the results that might be obtained. Grace and Keeley (2006) provide additional
illustrations of scenario simulations for this study.
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
12
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
13
References
Grace, J.B. and Bollen, K.A. (2005) Interpreting the results from multiple regression and
structural equation models. Bulletin of the Ecological Society of America. 86:283-295.
(http://www.esajournals.org/doi/pdf/10.1890/00129623%282005%2986%5B283%3AITRFMR%5D2.0.CO%3B2)
Grace, J. B. (2006) Structural equation modeling and natural systems. Cambridge University
Press, Cambridge. UK.
Grace, J.B. and Keeley, J.E. (2006) A structural equation model analysis of postfire plant
diversity in California shrublands. Ecological Applications 16:503-514.
Grace, J.B., Youngblood, A., Scheiner, S.M. (2009) Structural equation modeling and ecological
experiments. In: Miao, S., Carstenn, S., Nungesser, M. (eds.) Real World Ecology.
Springer Publishers.
Grace, J. B., D. R. Schoolmaster Jr., G. R. Guntenspergen, A. M. Little, B. R. Mitchell, K. M.
Miller, and E. W. Schweiger. (2012) Guidelines for a graph-theoretic implementation of
structural equation modeling. Ecosphere 3(8):article 73 (44 pages).
Grace, J.B., Adler, P.B., Harpole, W.S., Borer, E.T., and Seabloom, E.W. (2014) Understanding
productivity – richness relationships: causal networks as an alternative to bivariate plots.
Functional Ecology (in review).
Hoyle, R.H. (ed.) (2012a) Handbook of Structural Equation Modeling. The Guilford Press, New
York, USA.
Kline, R.B. (2011) Principles and Practice of Structural Equation Modeling. Third Edition.
Guilford Press, New York, USA.
MacKinnon, D.P. (2008) Introduction to Statistical Mediation Analysis. Lawrence Erlbaum
Associates, NY, USA.
Pearl, J. (2009) Causality. Cambridge University Press
Pugesek, B.H., Tomer, A., von Eye, A. (eds.) (2003) Structural Equation Modeling: Applications
in Ecological and Evolutionary Biology. Cambridge University Press, Cambridge, UK.
Rosseel, Y. (2012) Lavaan: An R package for structural equation modeling. Journal of Statistical
Software, 48, 1-36.
Shipley, B. (2000) Cause and Correlation in Biology. Cambridge University Press, Cambridge,
UK.
Whalen, M.A., Duffy, J.M., and Grace, J.B. (2013) Temporal shifts in top-down vs. bottom-up
control of epiphytic algae in a seagrass ecosystem. Ecology 94:510–520.
http://dx.doi.org/10.1890/12-0156.1.
Understanding productivity – richness relationships: Grace et al. 2014 – Appendix S1
Download