Description Usage Arguments Value See Also Examples
Fitting and simulating the conditional multivariate approach of Heffernan and Tawn (2004) to a dataset comprising 3 variables. Function utilizes the mexDependence and predict.mex.conditioned functions from the texmex package.
1 2 3  | HT04(data_Detrend_Dependence_df, data_Detrend_Declustered_df, u_Dependence,
  Migpd, mu = 365.25, N = 100, Margins = "gumbel", V = 10,
  Maxit = 10000)
 | 
data_Detrend_Dependence_df | 
 A data frame with (n+1) columns, containing in column 
  | 
data_Detrend_Declustered_df | 
 A data frame with (n+1) columns, containing in column 
  | 
u_Dependence | 
 Dependence quantile. Specifies the (sub-sample of) data to which the dependence model is fitted, that for which the conditioning variable exceeds the threshold associated with the prescribed quantile. Default is   | 
Migpd | 
 An   | 
Margins | 
 Character vector specifying the form of margins to which the data are transformed for carrying out dependence estimation. Default is   | 
V | 
 See documentation for mexDependence.  | 
Maxit | 
 See documentation for mexDependence.  | 
List comprising the fitted HT04 models Models, proportion of the time each variable is most extreme, given at least one variable is extreme Prop, as well as the simulated values on the transformed u.sim and original x.sim scales.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  | #Fitting and simulating from the Heffernan and Tawn (2004) model
S20.HT04<-HT04(data_Detrend_Dependence_df=S20.Detrend.df,
               data_Detrend_Declustered_df=S20.Detrend.Declustered.df,
               u_Dependence=0.995,Migpd=S20.Migpd,mu=365.25,N=1000)
#View model conditioning on rainfall
S20.HT04$Model$Rainfall
#Assigning simulations (transformed back to the original scale) a name
S20.HT04.Sim<-S20.HT04$x.sim
#Plotting observed (black) and simulated (red) values
S20.Pairs.Plot.Data<-data.frame(rbind(na.omit(S20.Detrend.df[,-1]),S20.HT04.Sim),
                                c(rep("Observation",nrow(na.omit(S20.Detrend.df))),
                                  rep("Simulation",nrow(S20.HT04.Sim))))
colnames(S20.Pairs.Plot.Data)<-c(names(S20.Detrend.df)[-1],"Type")
pairs(S20.Pairs.Plot.Data[,1:3],
      col=ifelse(S20.Pairs.Plot.Data$Type=="Observation","Black","Red"),
      upper.panel=NULL,pch=16)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.