CascadiaTools worked example: Structural equation models (piecewise SEM and lavaan)
Module: sem

These data are SIMULATED, so the true answer is known. See README_data.md.

To try it:
  1. Unzip this folder somewhere you can find it.
  2. Open the folder in Claude Code (with the CascadiaTools plugin installed).
  3. Paste the prompt below.

Prompt:
I have a CSV of 120 forest plots from 12 burn units after a wildfire (burned_forest_plots.csv). For each plot I have fire severity (dNBR), canopy cover, soil moisture, shrub cover and the number of birds detected in one point count. I think fire reduces canopy, less canopy means more shrubs, more shrubs means more birds, wetter soil means more shrubs, and fire might also reduce birds directly. Can you test this diagram, tell me how strong each link is, and how much of the fire effect on birds goes through the vegetation? Plots in the same burn unit are not independent. Please give me a report and figures for a paper.

The analysis settings used for the published example are in config.yaml.
WALKTHROUGH.md shows every step the agent took and the results.
Website: https://cascadiawildlifelab.org/tools/modules/sem.html
