I am trying to model the following continuous variable (its distribution shown in the image below) through a GAMLSS according to different variables. The question I have is how to choose the type of distribution of y (the one shown below). From what I have read, this is a more trial and error thing: try a distribution and see how well it fits with different criteria (AIC, BIC ...) and select the distribution with the lowest one. Is this procedure correct? Is there any way of predicting an appropriate distribution for the continuous variable shown below?
-
$\begingroup$ In gamlss there are two things you can model. One is the relationship between there dependent and independent variables, usually some kind of wiggly line as shown in your figure, and the second is the shape/distribution of the residuals, e.g. gaussian, t-distribution, some skewed out heavy tailed distributions etc., These are usually nothing like your figure. So what are you trying to choose? $\endgroup$– rep_hoCommented Jul 9, 2023 at 21:39
-
$\begingroup$ Note that you don't want to match the marginal distribution, but the conditional distribution, e.g. see stats.stackexchange.com/questions/105239/… $\endgroup$– Ben BolkerCommented Jul 9, 2023 at 23:37
1 Answer
You can automatically choose the distribution for a particular gamlss model. First fit the model (say m1) with one distribution. Then use
chooseDist(m1, type="realline")
for distributions on the real line, i.e. (-inf,+inf),
or
chooseDist(m1, type="real plus")
for distributions on the positive real line, i.e. (0,+inf).
[If I have response variable y on the positive real line, then I find the best distribution for y on (0,+Inf).
Then I find the best distribution for log(y) on (-inf,+inf), and then create the corresponding log distribution, e.g. for TF by
gen.Family("TF", type="log")
and fit it.
The GAIC values of the best distributions can then be compared.
Note as others have said, the conditional distribution is being fitted (and not the marginal distribution).]