0

Good morning,

I'm working on some spatio temporal data concerning PM 2.5.

I want to apply a version of random forest which explicitly accounts for spatial dependence in the observations, as introduced in "Random Forest for spatially dependent data" https://www.tandfonline.com/doi/abs/10.1080/01621459.2021.1950003#:~:text=Spatial%20linear%20mixed%2Dmodels%2C%20consisting,the%20covariate%20effect%20is%20nonlinear.

Here is the R package: https://www.google.com/url?sa=t&source=web&rct=j&url=https://cran.r-project.org/web/packages/RandomForestsGLS/vignettes/RandomForestsGLS_user_guide.pdf&ved=2ahUKEwjF6JiRhf73AhUQyxoKHbkBB-8QFnoECAUQAQ&usg=AOvVaw31g4t0m-Uoz1Wy-2ysDvla

The point is that I want to account for spatio temporal dependence, not just spatial dependence.

Theoretically if I could provide in input to the function the estimation of the spatio temporal covariance matrix Q (which will be a NT x NT matrix) then the fitting could run as in the original version of the alghoritm.

I have no idea about how to modify the function RFGLS_estimate to be able to provide in input the covariance matrix Q to be used to grow the trees.

Any suggestion?

Thank you very much in advance

  • 1
    It looks like you're new to SO; welcome to the community! If you want great answers quickly, it's best to make your question reproducible. This includes sample code you've attempted, listing non-base R packages, any errors/warnings received, sample data, like the output from `dput(head(dataObject))`, and what type of output you are expecting. Check it out: [making R questions reproducible](https://stackoverflow.com/q/5963269). – Kat May 27 '22 at 03:41

1 Answers1

0

You are correct that conceptually the RFGLS method can work with any input covariance (or inverse covariance matrix Q). However, currently the RandomForestsGLS R-package can only model certain classes of spatial or temporal dependence families but not spatio-temporal dependence. This is because certain spatial covariances (like the Nearest Neighbor Gaussian Process) and temporal covariances (like autoregressive model) yield sparse inverse covariance matrices that help considerably speed up the RFGLS algorithm. We are currently working on an extension that allows use of an user-specified covariance model.

Abhirup Datta
  • 103
  • 2
  • 12