gnu-octave / statistics

The Statistics package for GNU Octave
GNU General Public License v3.0
25 stars 24 forks source link

update ztest2 for deprecated stdnormal function #118

Closed ryanpdavidovics closed 11 months ago

ryanpdavidovics commented 11 months ago

Using Octave 8.3.0, after installing the package statistics 1.6.0 from forge on my machine, attempting to call ztest2 results in the following error:

octave:9> [h, pval, z] = ztest2(27, 100, 19, 100)
error: 'stdnormal_cdf' undefined near line 123, column 9

The 'stdnormal_cdf' function belongs to the statistics package from
Octave Forge but has not yet been implemented.

Please read <https://www.octave.org/missing.html> to learn how you can
contribute missing functionality.
error: called from
    ztest2 at line 123 column 7

Making the change in this pull request and reinstalling from a locally created tarball causes the function to work as expected:

octave:13> [h, pval, z] = ztest2(27, 100, 19, 100)
h = 0
pval = 0.1789
z = 1.3442

There are likely other functions with similar issues.