Dear scientist,
I use the data from UCLA to do the Pearson chi square test for negative binomial regression. I am not sure the way I got Pearson statistic is correct, would you please help me to check? In addition, the Pearson statistic is 2046.299, it is greater than chi square(df=313) =355.26, can I say this negative binomial model doesn't fit data well?
Thanks,
Liang
I use the data from UCLA to do the Pearson chi square test for negative binomial regression. I am not sure the way I got Pearson statistic is correct, would you please help me to check? In addition, the Pearson statistic is 2046.299, it is greater than chi square(df=313) =355.26, can I say this negative binomial model doesn't fit data well?
Thanks,
Liang
Code:
use https://stats.idre.ucla.edu/stat/stata/dae/nb_data, clear nbreg daysabs math i.prog predict that, n gen pearson=((daysabs-that)^2)/(that) tabstat pearson, stat(sum)
Comment