I am trying to use -chi2fit- test to compare distribution of my variable
LOCN against Poisson distribution. I am looking for some guidance on how to
use -chi2fit- test, i.e.,
- correct Stata syntax for the test,
- do I need to first compute cdf of the variable,
- in the Stata command how do I specify the theoretical distribution
I am comparing the distribution of my variable against,
- do I need to �collapse- the variable? If I do, then is it group
wise or for any point.
You can see, any help in implementing this test will be appreciated.
My variable looks and feels like the following, and my attempt on �chi2fit-
is below that.
. summ locn
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
locn | 4637 .4218245 .6325427 0 3
----------------------------------------------------------------------
My Attempt on �chi2test-
----------------------------------------------------------------
. chi2fit locn poisson if loyald==1 pw(4) fw(4), bins(4) df(0)
variable poisson not found