# Annual precipitation entire Great Lakes
# The time series plot with lowess smooth suggests an upward trend
# The autocorrelation in this data does not appear significant.
# The Mann-Kendall trend test confirms the upward trend.
data(PrecipGL)
plot(PrecipGL)
lines(lowess(time(PrecipGL),PrecipGL),lwd=3, col=2)
acf(PrecipGL)
MannKendall(PrecipGL)
#
#Use block bootstrap
library(boot)
z<-data(PrecipGL)
MKtau<-function(z) MannKendall(z)$tau
tsboot(PrecipGL, MKtau, R=200, l=5, sim="fixed")
Run the code above in your browser using DataCamp Workspace