Creating a simulation of the generalized logistic distribution maximum likelihood estimation of the parameters
with parallelized processing code using the foreach package.
genlog_simu(real.par, init.par, sample.size = 100,
k = 1000, seed = 555, threads = 1, progress.bar = T)It returns a data.frame with k rows (each simulation) and 7 columns with the following information:
a, b, p and mu are estimations using maximum likelihood estimation, for more info help(genlogis_mle)
sample.size The sample size used for each k simulation.
convergence The estimation's convergence status.
the real parameters value of the distribution wich the random sample will be taken. It has to be a vector of length 4,
the parameters are the values of c(a, b, p, mu) as listed in rgenlog,
mu can be omitted and will be set to 0. There are no default values.
Initial values for the parameters to be optimized over in the following order c(a, b, p, mu).
Can be an object returned by genlog_slider. There are no default values.
the sample size to be taken in each k simulation.
the number of simulations.
seed to be given to set.seed() function during the sampling process
the numbers of CPU threads to be used for parallel computing. If the threads number is higher than the available the maximum allowed will be used.
show progress bar for each thread during simulations, default value TRUE.
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)$$
For more about the distribution use help(dgenlog).
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.
genlog_simu(real.par = c(0.3, 0.9, 1.5, 0.0), init.par = c(0.9, 0.3, 0.2, 0.0),
sample.size = 100, k = 50, threads = 2, seed = 200)
Run the code above in your browser using DataLab