NiccoloTogni / Downscaling_SoilGrids_SMART_SED

Geostatistical Downscaling and Simulation with SoilGrids data in R for the SMART-SED project
1 stars 1 forks source link

ATPRK for downscaling Nighttime lights using a single target variable in R #1

Closed nikosGeography closed 2 years ago

nikosGeography commented 2 years ago

Dear Niccolo, I am trying to perform ATPRK to downscale nighttime lights using only one target variable (i.e. 1 image at finer scale). I am using your code as a guidance. So, based on your code, what I have done so far is:

  1. both my coarse resolution (cr) image and fine resolution (fn) image have the same crs and extent
  2. I upscaled the fr layer to match the resolution of the cr layer
  3. I converted my layers into data.frames I skipped the part 2. Analysis of soil texture You compute the variogram in your next step (i.e. _3. Downscaling and simulation of psf through Isometric Log-Ratio Area-to-Point Regression Kriging (ILRATPRK) but according to this paper they first performed a linear regression to estimate the trend and the residuals of the lm. Could you please explain why did you compute the variogram first before you estimate the residuals? Many thanks
NiccoloTogni commented 2 years ago

Hi Nikolas!

I think that's a mistake, in case of normal Regression Kriging the (semi)-variogram should be fit on the residuals and not the original data. Regression Kriging is essentially a two step method: a linear regression followed by a kriging applied to the residuals, that is why Regression Kriging is sometimes called "Kriging after detrending".

If you want to go more in depth in the topic, the question sparks an interesting discussion: assuming there is a spatial correlation between the residuals, then the linear regression should be performed by taking into account this correlation using Generalized Least Squares (GLS) instead of Ordinary Least Squares (OLS) to fit the model. Tis is what's done when performing a Kriging with External Drift (KED). Unfortunately, without knowing the residuals in advance the variogram cannot be estimated, so in KED the variogram is estimated using the original data instead. A possible solution would be to perform the following iterative procedure:

  1. The variogram (spatial correlation) is estimated using the original data
  2. A linear model is fit via GLS using the spatial covariance matrix obtained from the estimated (fit) variogram
  3. Residuals are obtained by de-trending the original data and a new variogram is fit using the residuals, we go back to point 2.

If I am not mistaken, I believe it has been proven empirically (I cannot find the reference but if you look at my article https://link.springer.com/article/10.1007/s00477-020-01900-2#Ack1 or my masters thesis https://www.politesi.polimi.it/handle/10589/150043 it should be in there) that this procedure only provides marginal improvement in the accuracy of the estimations, and is hence rarely utilised.

Here is an interesting reference https://www.researchgate.net/publication/228961429_Comparison_of_kriging_with_external_drift_and_regression-kriging

In conclusion, for regression Kriging (which is the technique I use in my script if I am not mistaken) it is better to fit the variogram using the residuals and not the original data points, what the authors of this paper http://www.koreascience.or.kr/article/JAKO201807356123511.pub do is more correct.

Good luck with your project!

Niccolò

On Wed, Dec 1, 2021 at 12:28 PM Nikolaos Tziokas @.***> wrote:

Dear Niccolo, I am trying to perform ATPRK to downscale nighttime lights using only one target variable (i.e. 1 image at finer scale). I am using your code as a guidance. So, based on your code, what I have done so far is:

  1. both my coarse resolution (cr) image and fine resolution (fn) image have the same crs and extent
  2. I upscaled the fr layer to match the resolution of the cr layer
  3. I converted my layers into data.frames I skipped the part 2. Analysis of soil texture You compute the variogram in your next step (i.e. 3. Downscaling and simulation of psf through Isometric Log-Ratio Area-to-Point Regression Kriging (ILR_ATPRK) but according to this http://www.koreascience.or.kr/article/JAKO201807356123511.pub paper they first performed a linear regression to estimate the trend and the residuals of the lm. Could you please explain why did you compute the variogram first before you estimate the residuals? Many thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NiccoloTogni/Downscaling_SoilGrids_SMART_SED/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKHYD4GBKZC6OOPQBFGP7FTUOYBGJANCNFSM5JEHFTJQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.