0
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

Perhaps you can model it as a sum of upvotes and downvotes (counted negatively), both as a Poisson distribution. That would probably require counts of both as well. It would more naturally fit a Poisson distribution, where the rate is proportional to the fraction of visitors inclined to up- of downvote respectively.

If you don't have the up- and downvote counts separately, I don't really like the idea of adding 12 to all counts, but I don't have a better suggestion. Perhaps you have the number of views to work with? You could then model the score as the sum of a -1, 0, 1 variable (an ordinal) for each visitor.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.