Thanks for your reply,
Let S={y_1, y_2, ...} be a countable set of non-negative numbers (not necessary integers) such that y_i \to \infty as i \to \infty. Then for any \lambda > 0,
C exp( -\lambda + y_i \log\lambda ) / \Gamma(1 + y_i), i=1,2, ...
defines a distribution (probability mass function) on S, where
C = exp(-\lambda) \sum_{i=1}^{\infty} \exp( y_i \log\lambda ) / \Gamma(1 + y_i) < \infty
is the normalizing factor. Thus the likelihood is proportional to the likelihood of an ordinary Poisson distribution.
This means that the same inference is obtained by using the Poisson likelihood for such data.
In the glm function, family=poisson with non-integer response returns warnings because of calling the Poisson density (mass) function with non-integer values.
> x <- c(2.1, 1.3, 6.2, 7.8, 2.2, 4.6, 3.4, 0.5)
> y <- c(1.4, 1.2, 3.1, 3.2, 1.5, 2.4, 1.8, 0.1)
> glm(y ~ x, family=poisson)
Call: glm(formula = y ~ x, family = poisson)
Coefficients:
(Intercept) x
-0.2077 0.1991
Degrees of Freedom: 7 Total (i.e. Null); 6 Residual
Null Deviance: 5.026
Residual Deviance: 1.474 AIC: Inf
Warning messages:
1: In dpois(y, mu, log = TRUE) : non-integer x = 1.400000
2: In dpois(y, mu, log = TRUE) : non-integer x = 1.200000
3: In dpois(y, mu, log = TRUE) : non-integer x = 3.100000
4: In dpois(y, mu, log = TRUE) : non-integer x = 3.200000
5: In dpois(y, mu, log = TRUE) : non-integer x = 1.500000
6: In dpois(y, mu, log = TRUE) : non-integer x = 2.400000
7: In dpois(y, mu, log = TRUE) : non-integer x = 1.800000
8: In dpois(y, mu, log = TRUE) : non-integer x = 0.100000
But with family=quasipoisson, the same results are obtained with no warnings.
> glm(y ~ x, family=quasipoisson)
Call: glm(formula = y ~ x, family = quasipoisson)
Coefficients:
(Intercept) x
-0.2077 0.1991
Degrees of Freedom: 7 Total (i.e. Null); 6 Residual
Null Deviance: 5.026
Residual Deviance: 1.474 AIC: NA
So, I guess it depends on the way the Poisson likelihood is implemented in INLA. It seams to work fine.
> stk <- inla.stack(data=list(y=y), A=list(1), effects=list(x=x))
> res <- inla(y ~ x, family="poisson", data=inla.stack.data(stk))
> res$summary.fixed[, 1:5]
mean sd 0.025quant 0.5quant 0.975quant
(Intercept) -0.1903892 0.5603239 -1.379172167 -0.1587073 0.8251839
x 0.1990556 0.1053645 -0.005815719 0.1983585 0.4076384
How does INLA treat non-integer values in the Poisson likelihood?
Does it simply calculate the likelihood at the data points regardless of their type (integer or non-integer)?
Best regards,
Abdollah