mrlplot(esk.rain$precip)

tcplot(esk.rain$precip, tlim=c(0.1,7), model="pp", nt = 20)

### here we take u=5, but you can choose u based on part (a)
thresh.fit<-fpot(esk.rain$precip, threshold=5, model="pp", start=list(loc=10,
 scale=1.2, shape=0.1), npp=365.25*24)
### next, we look at the resulting diagnostic plots
par(mfrow=c(1,3))
plot(thresh.fit)

### here we take a fixed threshold u=5, but you can choose u based on part (a)
thresh.fit_gpd<-fpot(esk.rain$precip, threshold=5, start=list(scale=1.2,shape=0.1))
### next, we look at the resulting diagnostic plots
par(mfrow=c(1,2))
plot(thresh.fit_gpd)
