fitgrouped2 | R Documentation |
Suppose a sample of n
independent observations each follows a three-parameter BS, GE, or Weibull distributions have been divided into m
separate groups of the form (r_{i-1},r_i]
, for i=1,\dots,m
. So, the likelihood function is given by
L(\Theta)=\frac{n!}{f_{1}!f_{2}!\dots f_{m}!}\prod_{i=1}^{m}\Bigl[F\bigl(r_{i}\big|\Theta\bigr)-F\bigl(r_{i-1}\big|\Theta\bigr)\Bigr]^{f_i},
where the r_0
is the lower bound of the first group, r_m
is the upper bound of the last group, and f_i
is the frequency of observations within i
-th group provided that n=\sum_{i=1}^{m}f_{i}
.
fitgrouped2(r, f, param, start, cdf, pdf, method = "Nelder-Mead", lb = 0, ub = Inf
, level = 0.05)
r |
A numeric vector of length |
f |
A numeric vector of length |
param |
Vector of the of the family parameter's names. |
start |
Vector of the initial values. |
cdf |
Expression of the cumulative distribution function. |
pdf |
Expression of the probability density function. |
method |
The method for the numerically optimization that includes one of |
lb |
Lower bound of the family's support. That is zero by default. |
ub |
Upper bound of the family's support. That is |
level |
Significance level for constructing asymptotic confidence interval That is |
A two-part list of objects given by the following:
Maximum likelihood (ML) estimator for the parameters of the fitted family to the gropued data, asymptotic standard error of the ML estimator, lower bound of the asymptotic confidence interval, and upper bound of the asymptotic confidence interval at the given level.
A sequence of goodness-of-fit measures consist of Anderson-Darling (AD
), Cramer-von Mises (CVM
), and Kolmogorov-Smirnov (KS
) statistics.
Mahdi Teimouri
r <- c(2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5)
f <- c(33, 111, 168, 147, 96, 45, 18, 4, 0)
param <- c("alpha", "beta", "mu")
pdf <- quote( alpha/beta*((x-mu)/beta)^(alpha-1)*exp( -((x-mu)/beta)^alpha ) )
cdf <- quote( 1-exp( -((x-mu)/beta)^alpha ) );
lb <- 2
ub <- Inf
start <-c(2, 3, 2)
level <- 0.05
fitgrouped2(r, f, param, start, cdf, pdf, method = "Nelder-Mead", lb = lb, ub = ub, level = 0.05)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.