## gevSim -
## gevFit -
# Simulate GEV Data:
xmpExtremes("Start: Simulte GEV Sample >")
# Use default length n=1000
x = gevSim(model = list(shape = 0.25, location =0 , scale = 1))
# Fit GEV Data by Probability Weighted Moments:
fit = gevFit(x, type = "pwm")
print(fit)
# Summarize Results:
par(mfcol = c(3, 2))
summary(fit)
## gevFit -
# Fit GEV Data by Max Log Likelihood Method:
xmpExtremes("Next: Estimate Parameters >")
fit = gevFit(x, type = "mle")
print(fit)
# Summarize Results:
summary(fit)
## gevSim -
## gevFit -
# Simulate Gumbel Data:
xmpExtremes("Next: Simulte Gumbel Sample >")
# Use default length n=1000
##> x = gevSim(model = list(shape = 0, location = 0, scale = 1))
# Fit Gumbel Data by Probability Weighted Moments:
##> fit = gevFit(x, type = "pwm", gumbel = TRUE)
##> print(fit)
# Summarize Results:
##> par(mfcol = c(3, 2))
##> summary(fit)
## Fit Gumbel Data by Max Log Likelihood Method:
xmpExtremes("Next: Estimate Parameters >")
##> fit = gevFit(x, type = "mle", gumbel = TRUE)
##> print(fit)
# Summarize Results:
##> summary(fit)
##> xmpExtremes("Press any key to continue >")
## Return levels based on GEV Fit:
# BMW Stock Data:
xmpExtremes("Next: Compute BMW Return Levels >")
par(mfrow = c(2, 1))
data(bmw)
# Fit GEV to monthly Block Maxima:
fit = gevFit(-bmw, block = "month")
# Calculate the 40 month return level
gevrlevelPlot(fit, k.block = 40, main = "BMW: Return Levels")
## Return levels based on GEV Fit:
xmpExtremes("Next: Compute SIEMENS Return Levels >")
# Siemens Stock Data:
data(siemens)
# Fit GEV to monthly Block Maxima:
fit = gevFit(-siemens, block = "month")
# Calculate the 40 month return level
gevrlevelPlot(fit, k.block = 40, main = "SIEMENS: Return Levels")
## Interactive Plot:
##> par(mfrow = c(1, 1), ask = TRUE)
##> plot(fit)Run the code above in your browser using DataLab