-
Notifications
You must be signed in to change notification settings - Fork 4
Description
This is a psudoCode to generate the Error Diagram in R. This is for Analyzer group 3 + 1
Function to generate error diagram
data = Earth Quake Data
params = parameter for the ETAS Function
plotErrorDiagram = function(data, params) {
CI_Dist = #Generate Estimated Confidence Interval Distance for timeperiod of interest using the ETAS function and appropriate Parameters
CI_List = #Generate Confidence Interval Distance for each of the earthquake data points using the ETAS function and appropriate Parameters
#Generate error point given specific confidence interval
errorPoint = sapply(CI_Dist, function(ci) {mean(CI_List > ci)}
timePeriod = #Sequence of Time Period
#Generates the plot for the error diagram
plot(seq(0,1,length(timePeriod)), errorPoint[timePeriod],type = "l", xlab=expression(tau), ylab=expression(nu),main = "Training set Error Diagram", col="red")
}
etasMode = function(params) {
#Simply implement the ETAS Model.
}