Test for Moran I rate function

This commit is contained in:
Javier Goizueta
2016-02-18 14:40:56 +01:00
parent 0833b2f226
commit f22b8334e0
3 changed files with 192 additions and 0 deletions
+9
View File
@@ -1,4 +1,5 @@
\i test/fixtures/ppoints.sql
\i test/fixtures/ppoints2.sql
-- Moral functions perform some nondeterministic computations
-- (to estimate the significance); we will set the seeds for the RNGs
@@ -10,3 +11,11 @@ SELECT ppoints.code, m.quads
JOIN cdb_crankshaft.cdb_moran_local('ppoints', 'value') m
ON ppoints.cartodb_id = m.ids
ORDER BY ppoints.code;
SELECT cdb_crankshaft.cdb_random_seeds(1234);
SELECT ppoints2.code, m.quads
FROM ppoints2
JOIN cdb_crankshaft.cdb_moran_local_rate('ppoints2', 'numerator', 'denominator') m
ON ppoints2.cartodb_id = m.ids
ORDER BY ppoints2.code;