# Load example data
data(shipley2009)
# Load model packages
library(lme4)
library(nlme)
# Create list of models
shipley2009.modlist = list(
lme(DD ~ lat, random = ~1|site/tree, na.action = na.omit,
data = shipley2009),
lme(Date ~ DD, random = ~1|site/tree, na.action = na.omit,
data = shipley2009),
lme(Growth ~ Date, random = ~1|site/tree, na.action = na.omit,
data = shipley2009),
glmer(Live ~ Growth+(1|site)+(1|tree),
family=binomial(link = "logit"), data = shipley2009)
)
# Filter exogenous variables
filter.exogenous(shipley2009.modlist)
# Compare with output from sem.basis.set
identical(
sem.basis.set(shipley2009.modlist),
filter.exogenous(shipley2009.modlist)
)
# Results are identical!
Run the code above in your browser using DataLab