config-i1 / greybox

Regression model building and forecasting in R
30 stars 7 forks source link

Distributions for ALM #13

Open config-i1 opened 6 years ago

config-i1 commented 6 years ago
  1. Normal distribution,
  2. F-distribution,
  3. Weird one with the ratio of folded normal distributions,
config-i1 commented 6 years ago
  1. Non-central Chi-Squared distribution
config-i1 commented 6 years ago
  1. Log-normal distribution
config-i1 commented 6 years ago

(1) and (5) are done.

config-i1 commented 6 years ago

(2) is too difficult to estimate. So probably leave it for a while...

config-i1 commented 6 years ago

(2) is not doable, because it's not possible to parametrise it using mean and sd. So tough luck...

config-i1 commented 6 years ago

Logit and probit are now implemented in alm() as well

config-i1 commented 6 years ago

Just for fun:

  1. Log Laplace,
  2. Log Logistic,
  3. Log S,
  4. Asymmetric Laplace,
  5. Student,

And even more:

  1. Poisson,
  2. Negative binomial,
config-i1 commented 6 years ago

(11) and (12) are done in 2e1a8d8a24d482d39f155ad6210ff9adf87e1c8e

config-i1 commented 6 years ago

(4) is done in db86e01f3b0206d6be6726cf3bcb58ff3e370dc4

config-i1 commented 5 years ago

(9) is done in 1d22422d3a0a4b411e046d2a796cd78514220320

config-i1 commented 5 years ago
  1. Beta distribution with potential restrictions on a or b. This might be useful for the rmc() with Beta for pAIC weights.
config-i1 commented 5 years ago
  1. Beta distribution with potential restrictions on a or b. This might be useful for the rmc() with Beta for pAIC weights.

The more reasonable thing to do is to construct two regressions: for a and for b - and then estimate the parameters via the maximisation of the likelihood.

config-i1 commented 5 years ago

Beta is done, but not yet sure how to use it in rmc...

config-i1 commented 5 years ago
  1. Generalised normal distribution: https://en.wikipedia.org/wiki/Generalized_normal_distribution
  2. Box-Cox / power normal distribution (as a more general than lognormal)
config-i1 commented 4 years ago

Summarising the progress so far, the following are not yet implemented, but could be potentially useful:

  1. Log Laplace,
  2. Log Logistic,
  3. Log S,
  4. Generalised normal distribution: https://en.wikipedia.org/wiki/Generalized_normal_distribution

Also makes sense to think about:

  1. Inverse Gaussian
  2. Gamma distribution,
  3. Erlang distribution,
  4. Exponential distribution.
config-i1 commented 4 years ago

Stuff left since 27th October 2019:

  1. Log Logistic,
  2. Generalised normal distribution: https://en.wikipedia.org/wiki/Generalized_normal_distribution
  3. Gamma distribution,
  4. Erlang distribution,
  5. Exponential distribution.
config-i1 commented 4 years ago
  1. Do specifically Exponential power distribution, which is more general than Normal, Laplace and S. Estimate shape parameter using ML.
config-i1 commented 4 years ago

(14) is done in 0.6.1.41008

config-i1 commented 3 years ago
  1. Logit-normal distribution: logit(x)~N(mu, sigma^2)
config-i1 commented 3 years ago

(19) is done in cedbd5b1f25ddf3942c74371da3caa8ad430967a

Steviey commented 3 years ago

R 4.x, greybox 0.6.4 Hi! is there already any gamma, weibull dist. available in greybox::alm(), or something similar?

config-i1 commented 3 years ago

Not yet. The closest thing to that is Inverse Gaussian. The full list of supported distributions is provided here: https://cran.r-project.org/web/packages/greybox/vignettes/alm.html

If you need them, I'll add them to the to do list.

Steviey commented 3 years ago

Oh, that would be wonderful Ivan, Thank you so much!

config-i1 commented 3 years ago

Gamma distribution is now available in 16eb934275ddc501c72f2647a53f47db3ad742a1 Please, note that the implemented model is similar to the one discussed for the Inverse Gaussian: https://cran.r-project.org/web/packages/greybox/vignettes/alm.html#invgauss - it might not be the classical Gamma you expect. The vignette has been updated to explain the details. Weibull is more challenging, so it won't be implemented any time soon. Sorry.

Steviey commented 3 years ago

Thank you Ivan, very nice! Will be dgamma available in other models too (sometimes)?