## 10.13 Problems

For questions 1-3, use the Lake Washington plankton data from the chapter. dat is the data to use.

library(MARSS)
all_dat <- lakeWAplanktonTrans
yr_frst <- 1980
yr_last <- 1989
plank_dat <- all_dat[all_dat[, "Year"] >= yr_frst & all_dat[,
"Year"] <= yr_last, ]
phytoplankton <- c("Cryptomonas", "Diatoms", "Greens", "Unicells",
"Other.algae")
dat_1980 <- plank_dat[, phytoplankton]
## transpose data so time goes across columns
dat_1980 <- t(dat_1980)
## remove the mean
dat <- zscore(dat_1980, mean.only = TRUE)
1. Fit other DFA models to the phytoplankton data with varying numbers of latent trends from 1-4 (we fit a 3 latent trend model above). Do not include any covariates in these models. Using R="diagonal and unequal" for the observation errors, which of the DFA models has the most support from the data?

Plot the model states (latent trends) and loadings as in Section 10.9. Describe the general patterns in the states and the ways the different taxa load onto those trends.

Also plot the the model fits as in Section 10.10. Do they look reasonable? Are there any particular problems or outliers?

2. How does the best model from Question 1 compare to a DFA model with the same number of latent trends, but with R="unconstrained"?

Plot the model states (latent trends) and loadings as in Section 10.9. Describe the general patterns in the states and the ways the different taxa load onto those trends.

Also plot the the model fits as in Section 10.10. Do they look reasonable? Are there any particular problems or outliers?

3. Fit a DFA model that includes temperature as a covariate and 3 trends (as in Section 10.12), but withR="unconstrained"? How does this model compare to the model with R="diagonal and unequal"? How does it compare to the model in Question 2?

Plot the model states and loadings as in Section 10.9. Describe the general patterns in the states and the ways the different taxa load onto those trends.

Also plot the the model fits as in Section 10.10. Do they look reasonable? Are there any particular problems or outliers?