0

I have a Bayesian GLM where the response that I'm interested in is count data. I want to weight the the response by the variance to account for uncertainty in the measurement. If the response was normally distributed (or well above zero), I would use this formula in a Bayesian model coded in JAGS:

N[i]~dnorm(muN[i], tau.psd[i])
tau.psd~pow(psd[i],-2)
muN[i]<-intercept + beta1*fixed1[i]

Where N[i] is my observed data at each site i, psd[i] is the standard deviation of the observed data at each site i and fixed[i] is the fixed effect I'm interested in. Because count response is bounded by zero, and values are often low and close to zero (range 0-15), predictions from this model give unobservable negative values. However the poisson distribution (dpois) only take the mean as a parameter:

N[i]~dpois(lambda[i])
log(lambda[i])<-intercept + beta1*fixed1[i]

How would you weight this distribution by the variance?

kjetil b halvorsen
  • 63,378
  • 26
  • 142
  • 467
Sovay
  • 11
  • 1

1 Answers1

1

For Poisson distribution mean = variance = $\lambda$, so if you know that in case of your data variance is not equal to mean, then the data does not follow Poisson distribution. You simply need to use different model for this data. Poisson regression is one of the most popular, but not only model for count data.

Tim
  • 108,699
  • 20
  • 212
  • 390
  • exactly. But it’s not clear to me how to weight the other other count distributions like dnegbin or dgamma by variance either. They former accepting an over-dispersion parameter r and the later with shape/scale. I guess to rephrase the question....how do you weight count distributions by variance in the response? If you have an example for how this could be done that would be really helpful. I haven’t been able to successfully find one myself. – Sovay May 03 '20 at 11:33
  • @Sovay the answer is that you cannot weight the distribution. You need to find other model, that allows for weighting, e.g. using Gaussian, or reformulate your model. It is hard to give more focused answer without more details. – Tim May 03 '20 at 12:40
  • Thanks Tim. I'm currently using a gaussian distribution because I don't know of any other way to model the reponse I have (The code I included in my first question). The response is continuous data, bounded by zero, and the measurement has a mean and standard deviation. I want to take into account the variance in the measurement. While modeling the effect of my variables of interest. Using a gaussian distribution gives predictions that are negative which are not possible, so it's not appropriate. What other information do you need? – Sovay May 04 '20 at 13:08