I am not statistical faculty student. But, for climatic research, some time I need several statistical test. General I use various type of software like XLSTAT, SPSS, Matlab function or R Programming language to solve my statistical problem.
Now I want to write my own function to calculate several Homogeneity test like SNHT, Pettitt, Buishand Range or Von Neumann (Previously I Use XLSTAT to calculate Homogeneity test). Because of, I want to Batchly calculate Homogeneity for many station data.
The theory of those Homogeneity test are available in many research paper (Some paper listed in below). But, I can not find, how to calculate p value for those test. Can any one help me, to solve this problem ?