where \(0 < x < 1\), \(0 < \theta\), and 0 otherwise.
The model is \(Beta(\theta, 1)\), where \(\theta\) is the parameter of interest.
library(fitdistrplus)
Loading required package: MASS
Loading required package: survival
n <-100theta <-0.5x <-rbeta(n, theta, 1)plotdist(x)
fit <-fitdist(x, "beta", start =list(shape1 =1), fix.arg =list(shape2 =1))summary(fit)
Fitting of the distribution ' beta ' by maximum likelihood
Parameters :
estimate Std. Error
shape1 0.5368586 0.05368567
Fixed parameters:
value
shape2 1
Loglikelihood: 24.0668 AIC: -46.13359 BIC: -43.52842
The model is \(Pareto( (\theta+1), 1)\), where \(\theta\) is the parameter of interest.
library(fitdistrplus)library(Pareto)n <-100theta <-5x <-rPareto(n, t =1, alpha = (theta +1))plotdist(x)
fit <-fitdist(x, dPareto, start =list(alpha =10), fix.arg =list(t =1))
Warning in checkparamlist(arg_startfix$start.arg, arg_startfix$fix.arg, : Some
parameter names have no starting/fixed value but have a default value:
truncation.
Warning in fitdist(x, dPareto, start = list(alpha = 10), fix.arg = list(t =
1)): The pPareto function should have its first argument named: q as in base R
summary(fit)
Fitting of the distribution ' Pareto ' by maximum likelihood
Parameters :
estimate Std. Error
alpha 5.779624 0.5779624
Fixed parameters:
value
t 1
Loglikelihood: 58.13171 AIC: -114.2634 BIC: -111.6582
fit <-fitdist(x, "gamma", start =list(rate =2), fix.arg =list(shape =2))summary(fit)
Fitting of the distribution ' gamma ' by maximum likelihood
Parameters :
estimate Std. Error
rate 4.554833 0.3220753
Fixed parameters:
value
shape 2
Loglikelihood: -3.607613 AIC: 9.215227 BIC: 11.8204
fit <-fitdist(x, "geom", start =list(prob =0.5))summary(fit)
Fitting of the distribution ' geom ' by maximum likelihood
Parameters :
estimate Std. Error
prob 0.4608293 0.03383775
Loglikelihood: -149.7464 AIC: 301.4927 BIC: 304.0979