# Kriging on log transformed rainfall data

I am beginner in R. I had found in the literature that prior to performing kriging on the data, the distribution has to be investigated to check if it is Gaussian.

So, in order to check if the data follows Gaussian I plotted the quantile-quantile plot of rainfall for all days using data from 50 stations.

So, inorder to check if the data follows gaussian i plotted the quantile-quantile plot of rainfall for all days using N=50 stations data.

Shown below is the q-q plot for good rainy day.

The q-q plot of log transformed using transformation function : log(x+1)

Q-Q plot for bad(low) rainy day and its transformed plot are provided at to save space.. http://s20.postimage.org/a3kocwfgd/image.png

http://s20.postimage.org/4qvtyrrjx/image.png

I have few basic questions:

1. Though the fit of log-transformed data is good on good rainy days,it is not that on days where rainfall is scanty.
2. How to back transform the data after interpolation?
3. How to choose the block size in block kriging? any guidelines. I would like to compare the kriged value against the gridded rainfall from TRMM(25 km by 25 km)?
-
Hi! all , my question was originnally posted at stackoverflow.com/questions/14285918/…. Sorry about not posting figures and linking to the original, as I was not allowed to based on my reputation(new user). – user1142937 Jan 14 '13 at 17:19
If you have access to it, the article Block Kriging for Lognormal Spatial Processes by Cressie, probably describes exactly what you want to do. ( link.springer.com/article/10.1007%2Fs11004-005-9022-8 ). Also for Q1. Your logged data looks quite fine; you are working with "true" data, I have seen far worse plots being called "Gaussians". For Q2. A simple $exp()$ should do. After all you are logging only the $y$-axis. Your $x$-axis remains unchanged. – usεr11852 Jan 14 '13 at 18:40
Your lognormal probability plot is beautiful. I bet if you were to run a K-S test it would not reject lognormality. – whuber Jan 15 '13 at 15:26
@ whuber, user11852. I came across another post stats.stackexchange.com/questions/1444/…, which put me in spot of bother. I had log transformed the data excluding the zero precipitation values. – user1142937 Jan 16 '13 at 16:04
Yes, it's wrong to exclude the zeros! For an extended discussion of this, please see my reply at stats.stackexchange.com/a/30749. – whuber Jan 16 '13 at 22:03

Regarding the choice of block size in block kriging:

"Experience has shown is best to keep the blocks approximately the same size as the separation between the samples" [AM89]. In the same text the author also comments that it is important not only to carefully look at the block size but also the layout of your sample's locations and also highlights in more than one places in the text the possible problem that might arise by using small blocks especially in the case of a sparse grid.

As mentioned I have also seen N.Cressie's paper [CN06]; Cressie presents a series of boxplots of the efficiencies of the block predictor $\tilde{Z}(B)$ against the unbiased predictor $\check{Z}(B)$ [RJ90] generated by simple kriging in the original scale. He then uses the ratio of mean squared prediction errors (MSPE) in order to judge the efficient of the block kriging for different block sizes $B$. ($B$ symbolizes a block $B$ on a domain $D$)

As a closing remark: It is important to note that we are making a "permanence of lognormality" [RJ90] (ie. if Z() is a lognormal process then log(Z(B)) is normally distributed provided that the block is not too large) [CR06]; that hypothesis can have serious implications on the optimality of our predictors.

[AM98] M. Armstrong, 1998, Basic Linear Geostatistics, Chapt. 9.6.1 (Google Book)

[RJ90] J.Rivoirard, 1990, A Review of Lognormal Estimators for In Situ Reserves (Springer Link)

[CN06] N. Cressie, 2006, Block Kriging for Lognormal Spatial Processes (Springer Link)

-

In addition to QQ plots, it might be also useful the boxplots and histograms to detect at glance the non-normarlity (asymmetry, outliers, etc). You can check also kurtosis and skewness, but in case of bdoubt, to be sure make a Shapiro-Wilk normality test:

shapiro.test(x)


The fBasics package includes several another normality tests (Kolmogorov-Smirnov, Anderson–Darling, etc.).

-
That QQ-plot of logged values is fine; no reason to look in further tests. It has only 50 readings anyway so some deviations from normality are too be expected. In the end of the day, the important thing is that the error residuals are normally distributed. – usεr11852 Jan 14 '13 at 22:48
But I have not alwasys clear where is the difference between a twoppeny "some deviation" and a little but meaningful deviation in a graph. On the other hand, normality test also take into account the number of data, so I prefer a less subjective decision based in a p-value. – Fran Jan 14 '13 at 23:19
Look at the log(data) QQ-plot; you don't need a KS-test to tell you the data are normal. I am not saying KS-test, and other test of normality in that matter, is not helpful; just I think at the current state of the analysis it is rather redundant (and I don't trust $p$-values all that much). As I said: the important thing is that the error residuals are normally distributed. – usεr11852 Jan 14 '13 at 23:47