2

https://drive.google.com/file/d/0B3fQ9_46L-O0ZXVYb3lzZDBZaHM/view?usp=sharing https://drive.google.com/file/d/0B3fQ9_46L-O0TjJwYmF6UThNSGs/view?usp=sharing

Here, I have a time series data of precipitation of two stations of the same place in CSV format. I am trying to find these two stations precipitation trend as well as the magnitude of the trend. For doing that I used Mann-Kendall and Sen's slope. I tried in this particular way, I want to know whether I am doing right or not? In this below code, I calculate trend and magnitude individually but my aim is to calculate trend and magnitude of two stations together. How I can perform the pre-whitening, Mann-Kendall and Sen's slope test for two stations at once as well as their plot?

library(xts)
library(Kendall)
library(zyp)
library(trend)
setwd("~/Desktop/pawan thapa 2/pawan thapa/rautahat")
ram = read.csv('ramoli_preci.csv',header=TRUE, stringsAsFactors=FALSE)
gaur2= read.csv('preci_Gaur.csv',header=TRUE, stringsAsFactors=F)
# Get data properties
dim(gaur2)
dim(ram)
head(ram)
date <- as.Date(as.character(gaur2$Year), "%Y")
date_r <- as.Date(as.character(ram$Year), "%Y")
gaur.ts<-as.ts(gaur2)
ram.ts<-as.ts(ram)
head(ram.ts)
class(ram.ts)
head(ram.ts)
hist(ram.ts)
acf(ram.ts)

mk.test(ram.ts)
sens.slope(ram.ts)

head(date)
tail(date)
class(date)
class(gaur2)
str(gaur2)

class(gaur.ts)
head(gaur.ts)
mk.test(gaur.ts)
sens.slope(gaur.ts)
hist(gaur.ts)
  • Please consider referring to [this discussion](http://stackoverflow.com/q/5963269/1655567) and making your post reproducible. – Konrad Jan 01 '17 at 09:07

0 Answers0