# obtain a GEV with mean, 4, scale 1.5 and shape of -0.1
mu <- 4 # location parameter
sigma <- 1.5 # scale parameter
xi <- -0.1 # shape parameter
params <- c( mu, sigma, xi)
# generate a sample of size 25
gen1 <- gen.gev( p=params, n=25)
# Now generate one with a trend.
gen2 <- gen.gev( p=params, n=25, trend=0.1)
# Fit 'gen1' to a GEV distribution and plot the diagnostics.
gen1.fit <- gev.fit( gen1)
class( gen1.fit) <- "gev.fit"
plot( gen1.fit)
# Fit 'gen2' to a GEV distribution and plot the diagnostics.
gen2.fit1 <- gev.fit( gen2)
class( gen2.fit1) <- "gev.fit"
plot( gen2.fit1)
Run the code above in your browser using DataLab