diff --git a/src/pg/test/expected/02_moran_test.out b/src/pg/test/expected/02_moran_test.out index 3ba5bfd..7897622 100644 --- a/src/pg/test/expected/02_moran_test.out +++ b/src/pg/test/expected/02_moran_test.out @@ -5,6 +5,12 @@ SET client_min_messages TO WARNING; \set ECHO none _cdb_random_seeds +(1 row) +moran|significance +0.3399|-0.0196 +(1 row) +_cdb_random_seeds + (1 row) code|quads 01|HH diff --git a/src/pg/test/sql/02_moran_test.sql b/src/pg/test/sql/02_moran_test.sql index 5545a4a..d2cfaef 100644 --- a/src/pg/test/sql/02_moran_test.sql +++ b/src/pg/test/sql/02_moran_test.sql @@ -6,6 +6,14 @@ -- Areas of Interest functions perform some nondeterministic computations -- (to estimate the significance); we will set the seeds for the RNGs -- that affect those results to have repeateble results + +-- Moran's I Global +SELECT cdb_crankshaft._cdb_random_seeds(1234); + +SELECT round(moran, 4) As moran, round(significance, 4) As significance + FROM cdb_crankshaft.CDB_AreasOfInterestGlobal('SELECT * FROM ppoints', 'value') m(moran, significance); + +-- Moran's I Local SELECT cdb_crankshaft._cdb_random_seeds(1234); SELECT ppoints.code, m.quads