.- help for ^nbgof^ (STB-33: sg59) .- Neyman Barton GOF ----------------- ^nbgof^ varlist [^if^ exp] [^in^ exp] Description ----------- This program performs a Neyman-Barton Smooth goodness-of-fit test of order 2. The test result is asymptotically distributed as chi-squared with 2 df. This is used for testing of unformity (i.e., a uniform distribution). The test is valid for U(0,1) so if the data are outside this range they are transformed to inside the range using a standard transformation (Stephens, 1986). The output consists of four pieces of information for each variable: (1) the value of the test statistic; (2) it's p-value; (3) the value of U-bar, one of the two components of the test statistic and also a test statistic; (4) the value of S-squared, the other component of the test statistic, and also a test statistic. P-values are not given for U-bar and S-squared as I have been unable to find a reasonable approximation to the tables given in Stephens. (Each of these is asymptotically standard normal.) The N-B test is equal to the sum of the squared values of the component tests. The data are expected to be in ungrouped form. If they are grouped, use STATA's @expand@ command. Options ------- No options other than ^if^ and ^in^ are allowed. Examples -------- The following uses the example given in Stephens (1986): . ^input u^ u 1. .004 2. .304 3. .612 4. .748 5. .771 6. .806 7. .850 8. .885 9. .906 10. .977 11. end . ^nbgof u^ Neyman-Barton Variable Smooth GOF Test p-value U-bar S-squared ---------+------------------------------------------------------ u | 6.437 0.0400 2.041 1.507 References ---------- Stephens, MA (1986), "Tests for the Uniform Distribution," in _Goodness-of-Fit Techniques_, ed. by RB D'Agostino and MA Stephens, New York: Marcel Dekker, Inc. Author ------ Richard Goldstein Qualitas, Inc. richgold@@netcom.com