0

I have a dataset including three variables including company id (there are 96 companies), expert id (there are 38 experts) and points given by experts to companies. Points are discrete values from 0 to 100. I tried fitting an overdispersed poisson to model points given by the experts. But I don't know why the model overfits although I am using a linear likelihood. Here is my JAGS code:

model_code <- "
model
{
  # Likelihood
  
  for (i in 1:N) {
  
    y[i] ~ dpois(exp(mu[i]))
    mu[i] ~ dnorm(alpha[company[i]] + beta[expert[i]] , sigma^-2)
    
  }
  
  # Priors
  
  
    for (j in 1:J){
    alpha[j] ~ dnorm (mu.a, sigma.a^-2) 
    }
    
    for (k in 1:K){
    beta[k] ~ dnorm (mu.a, sigma.a^-2) 
    }
    

  
  mu.a ~ dunif (0, 100)
  sigma.a ~ dunif (0, 100)
  sigma ~ dunif(0, 100)

}
"

Anyone knows why this model overfits and how to fix it?

Amin Shn
  • 532
  • 2
  • 11
  • What indication do you have that it is overfit? Is there a specific metric? Are you looking at the posterior or the posterior predictive distribution? – merv Feb 27 '21 at 23:07
  • @merv Training R-squared is 0.99 whereas testing R-squared is 0.43. – Amin Shn Feb 28 '21 at 15:01

0 Answers0