Slider for generalized logistic
genlog_slider.Rd
Make a generalized logistic distribution slider to compare histogram with theoretical distribution
Arguments
- data
vector of data to compare.
- return_var
a char string to name where parameters are assigned
- mu_range
a number to setup the minimum and maximum range value of the mu parameter
- skew
logical, if
TRUE
, a model with skewness should be used..
Value
The function plots a interactive graphic in RStudio Viewer panel.
Also, the parameters a, b, p
and mu
can be returned to
return_var
if asked in the graphic.
Details
There is a small gear in the top left of the graphic where you can slide the parameters @param a,b,p,mu
.
The used distribution for this package is given by:
$$f(x) = ((a + b*(1+p)*(abs(x-mu)^p))*exp(-(x-mu)*(a+b*(|x-mu|^p)))) / ((exp(-(x-mu)*(a + b* (|x-mu|^p)))+1)^2)$$
If the density function is not printed it is not defined for these parameters.
For skew = T
the model used is
The used distribution for is given by:
$$f(x) = 2*((a + b*(1+p)*(abs(x-mu)^p))*exp(-(x-mu)*(a+b*(abs(x-mu)^p))))/
((exp(-(x-mu)*(a + b* (abs(x-mu)^p)))+1)^2) *
((exp(-(skew*(x-mu))*(a+b*(abs(skew*(x-mu))^p)))+1)^(-1)) $$#' for more information about the model (help(dgenlog_sk)
)
If the density function is not printed it is not defined for these parameters.
help(dgenlog)
for parameters restrictions.
This function requires RStudio to run.
References
Rathie, P. N. and Swamee, P. K (2006) On a new invertible generalized logistic distribution approximation to normal distribution, Technical Research Report in Statistics, 07/2006, Dept. of Statistics, Univ. of Brasilia, Brasilia, Brazil.
Azzalini, A. (1985) A class of distributions which includes the normal ones. Scandinavian Journal of Statistics.
Examples
if (FALSE) {
datas <- rgenlog(1000)
if (manipulate::isAvailable()) {
genlog_slider(datas, return_var = 'parameters')
}
}