Displaying 2 results from an estimated 2 matches for "fpar".
Did you mean:
far
2020 Oct 24
0
Fitting Mixed Distributions in the fitdistrplus package
...2, scale=scale2)
pmixgam <- function(q, prob, shape1, scale1, shape2, scale2)
prob*pgamma(q, shape1, scale=scale1)+ (1-prob)*ppareto(q, shape2, scale=scale2)
library(actuar)
library(fitdistrplus)
data("danishuni")
x<- danishuni$Loss
fgam<- fitdist(x,"gamma",lower=0)
fpar<- fitdist(x,"pareto",start = list(shape=2,scale=2),lower=0)
fmixgam<- fitdist(x,"mixgam",start =
list(prob=1/2,shape1=1,scale1=1,shape2=1,scale2=1),lower=0)
cdfcomp(list(fgam, fpar, fmixgam), xlogscale = TRUE)
gofstat(list(fgam, fpar, fmixgam))...
2020 Oct 21
1
Fitting Mixed Distributions in the fitdistrplus package
...a data set
danishuni. However the distributions are not appropriate to fit both tails
of the data set hence a mixed distribution is required which has ben
defined as "mixgampar"
as shown below.
library(fitdistrplus)
x<- danishuni$Loss
fgam<- fitdist(x,"gamma",lower=0)
fpar<- fitdist(x,"pareto",start = list(shape=2,scale=2),lower=0)
fmixgampar<- fitdist(x,"mixgampar",start =
list(prob=1/2,nu=1,lambda=1,alpha=1,theta=1),lower=0)
Error in fitdist(x, "mixgampar", start = list(prob = 1/2, nu = 1, lambda =
1, :
The dmixgampar functi...