I am working on a research model looking at the data from stack overflow, especially the relationship of various variables on the score of a question. looking at the histogram of my dependent variable (Score) it holds a distribution similar to Poisson where most of the questions get a score of 0 or 1 and then a few questions get more upvotes while the histogram is right-skewed. The problematic part is that some questions get a negative score.
Looking at the data, I was quite convinced that the score is a count data. The values range from -12 to around 150.
I tested the model using glm in r
output <-glm(formula = Score+12 ~ AnswerCount+AnswererRep+TimeDiff+AnswerQuotes, data = sds[[1]],
family = poisson, )
output2 <-glm(formula = Score+12 ~ AnswerCount+AnswererRep+TimeDiff+AnswerQuotes, data = sds[[1]],
family = quasipoisson )
In addition the model reports underdisperssion (0.48) therefore I run a quasiposisson test. I tried a glm.nb (from MASS package) where the theta variable went up to > 40000. And r reported a warning message:
Warning messages:
1: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > :
iteration limit reached
2: In theta.ml(Y, mu, sum(w), w, limit = control$maxit, trace = control$trace > :
iteration limit reached
In the end, I am just not sure what would be the correct regression model to use and whether the glm is the way to go. And if so, is it okay to add a constant (+12) to the dependent variable? Since I found some people be both for and against that.