Nothing
#################################################################################
##
## R package pmoments by Alexios Ghalanos Copyright (C) 2008
## This file is part of the R package pmoments.
##
## The R package pmoments is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## The R package pmoments is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
#################################################################################
pmUtility<-function(data,threshold,urc,lrc,lmoment=1,umoment=1)
{
UseMethod("pmUtility")
}
.pmUtility<-function(data,threshold,urc,lrc,lmoment=1,umoment=1)
{
x<-sort(data)
lx<-x[x<=threshold]
ux<-x[x>threshold]
lans=-lrc*abs(lx-threshold)^lmoment
uans=urc*(ux-threshold)^umoment
utility<-c(lans,uans)
ans<-new("PMU",
data=data,
threshold = threshold,
urc = urc,
lrc = lrc,
lmoment = lmoment,
umoment = umoment,
utility = utility)
return(ans)
}
setMethod("pmUtility",signature(data="vector"), .pmUtility)
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.