Nothing
#' @title Probabilistic estimation of earthquake recurrence interval using gamma distribution
#' @description Computes the probability of an earthquake within a specified time "r" and elapsed time "te".
#'
#' @param fit Fit is the fitgamma object. See ?fitgamma for details.
#' @param r The specified time in which the probability of an earthquake is desired to be calculated.
#' @param te Elapsed time since the last earthquake
#' @return A numeric value
#' @references Pasari, S. and Dikshit, O. (2014). Impact of three-parameter Weibull models in probabilistic assessment of earthquake hazards. Pure and Applied Geophysics, 171, 1251-1281.
#' @export
#' @importFrom stats ks.test optim
#' @importFrom VGAM dpareto ppareto rpareto
#' @examples
#' fit=fitgamma(c(1,1),data=data_earthquake_6_6.5)
#' gammacp(fit,r=2,te=5)
gammacp=function(fit,r,te){
if (missingArg(fit) == TRUE)
stop("fit object is missing. The fit object must be fitgamma object. See ?fitgamma for details.")
if (missingArg(r) == TRUE)
stop("r object is missing.")
if (missingArg(te) == TRUE)
stop("te object is missing.")
GG=cdfgamma(fit$mle,r+te)
G=cdfgamma(fit$mle,te)
f=(GG-G)/(1-G)
return(f)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.