# extRemes - Analýza extrémních hodnot # metoda prahovani # nastaveni praconvniho adresare getwd() # setwd("C:/data/R_data/MFGcviceni") # setwd("\\\\ha-ntc.ics.muni.cz/profiles/XXX/Desktop/cviceni") getwd() # install.packages("extRemes") # library(extRemes) pXd <- read.table('turany_p_daily_1958_2018.csv', header = T, dec = '.', sep = ';') names(pXd) plot(pXd$year, pXd$prec, type="p", col = "blue", xlab = "rok", ylab = "Suma srazek [mm]", main="Denni sumy srazek") # abline(h=40) # pomoci diagnostickych grafu hledame vhodnou prahovou hodnotu threshrange.plot(pXd$prec, r = c(0, 40), nint = 20) mrlplot(pXd$prec,xlim = c(0, 40)) # odhad parametru modelu, prokladame zobecnene Paretovo rozdeleni (GP)a musi se urcit time units modelD <- fevd(pXd$prec, threshold = 40, type = "GP",time.units = "365/year") plot(modelD) ci(modelD) ci(modelD, type = "parameter") return.level(modelD) return.level(modelD, do.ci = TRUE) ci(modelD, return.period = c(5, 50, 100))