Hey @linas! Thanks for being patient.
Via email you said you’d be happy to run this on a server. I don’t have access to one right now, so it would be splendid if you could run this for me.
I’m uploading the following:
- R notebook (
canopy_loss_gp.R
)
- the Stan code (
gp_regression_ard.stan
)
- raw data file you’ve sent me, who’s name I’ve changed (
data_species.csv
)
I’ve been very careful massaging the data, and this should only need to be run once.
Once you run the R file, you can run the GP model from command stan with:
./gp_regression_ard sample data file=gp_trees_demo.input.R output file=trees_demo_output.csv
.
There shouldn’t be any divergences, but proposals with initially get reject a lot due to the covariance matrix.
What I’m doing is “generating counterfactual predictions from the GP”.
What we’ll get from this model:
- A time series of canopy Thin from Tree 1, had it received:
a. treatment T (T)
b. treatment X (X)
c. no treatment (U)
What else would you like to learn?
We can also generate whatever we want. In words (please, no math, just English) can you please describe what you’d like to learn? Some examples would be:
- A Map at time T, for all trees untreated (treatment U)
- At location L (given in lat, long), what would the Canopy Time Series look like if this were a White Ash as opposed to a Blue Ash.
After that, it’s just a matter of formatting data and waiting patiently.
Possible Extensions
We can do a survival model, but I’ve since forgotten everything I read about survival analysis and I have to freshen up before I make myself look silly, as I’ve done previously in this thread :).
And the documents:
canopy_loss_gp.R (4.3 KB)
gp_regression_ard.stan (2.0 KB)
data.csv (20.7 KB)
Forget this stuff below, I was just doing the “LME” model instead with Stan, but it’s not particularly useful for us, I think since it’s spatial GPs are the way to go.