1
$\begingroup$

I have data vector and I am trying to do chi square test. This test use frequency from real data and expected frequency. my data

table(T1)
T1 
   0   1   2   3   4   5   6   7   8   9  10  11  12  13  14  26 
 204  11   5  11   5   1   8   2   3   1   1   2   2   2   2   1 

if I use R to generate data set that follow my distribution results are quite close.

testiramo <- rZINBI(261, mu = 1.19, sigma = 3.13, nu = 0.78)
table(testiramo)
testiramo
  0   1   2   3   4   5   7  11 
237   9   3   7   1   2   1   1  

mu = mean
sigma = std.deviation
nu = probability of zeroes

My questions are

  1. How to calculate expected frequency for zero inflated negative binomial to compare with using chi square test?

  2. is it possible to define range / level of overdispersion of data (as you can see in this generated sample of data have maximum value of 11 and mine is 26)

$\endgroup$
1
$\begingroup$

Regarding 1. The table you printed already has this.

Regarding 2. Not if you want to keep the other parameters (mu, sigma and nu) the same. I am assuming you got those from your data.

$\endgroup$
  • $\begingroup$ This parameters are from my real data. Should I mark this 26 as outliner and remove from dataset? What can be done to tweak this parameter sigma (since this is measure of distance from mean), and is there some procedure or test (MLE) for that (any reference to MLE will be great specially since I am using data vector and all examples I did find are for multivariate data). $\endgroup$ – explorer Mar 9 '17 at 8:21
  • $\begingroup$ If i do chi sqared test with my dataset (T1) and testiramo i have this result $\endgroup$ – explorer Mar 9 '17 at 10:16
  • $\begingroup$ chisq.test(T1, testiramo) Pearson's Chi-squared test data: T1 and testiramo X-squared = 295.23, df = 90, p-value < 2.2e-16 Warning message: In chisq.test(T1, testiramo) : Chi-squared approximation may be incorrect $\endgroup$ – explorer Mar 9 '17 at 10:17
  • $\begingroup$ is this small p value confirm that this come from same distribution? and how to interpret other results. $\endgroup$ – explorer Mar 9 '17 at 10:23
  • $\begingroup$ The small p value indicates different results but you need an exact test. $\endgroup$ – Peter Flom - Reinstate Monica Mar 9 '17 at 11:45

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.