I'm using GAMLSS to model a variable as normally distributed with mean and SD as linear functions of some parameters. Sometimes GAMLSS gives me negative global deviances, but in my limited understanding, a normal distribution can't have a negative deviance as the deviance is equivalent to the squared error. Should I be worried? I've done some searching and found that negative deviances can happen for some distributions, but nobody seems to explicitly mention the normal distribution.
You can simulate some data to see what happens in a simple case:
n <- 10 x <- 1:n set.seed(1234) y <- 0.1 + 0.2 * x + rnorm(n, mean = 0, sd = 0.2) library(gamlss) model <- gamlss(y ~ x, family = NO) summary(x)
The global deviance reported by R is negative, the reason for this being the fact that the variability of the y observations about the fitted regression line is small.
If you increase the amount of this variability, the global deviance will become positive:
n <- 10 x <- 1:n set.seed(1234) y <- 0.1 + 0.2 * x + rnorm(n, mean = 0, sd = 2) library(gamlss) model <- gamlss(y ~ x, family = NO)
So it is possible to have a negative global deviance in this simple case if the model produces a low value for the residual sum of squares.