diff --git a/tests/integration/test_cubepart.py b/tests/integration/test_cubepart.py index e116f3d97..6269d02fe 100644 --- a/tests/integration/test_cubepart.py +++ b/tests/integration/test_cubepart.py @@ -1451,6 +1451,38 @@ def it_provides_values_for_cat_with_means_and_insertions(self): ) assert strand.title == "Untitled" + def it_provides_std_dev_err_univ_mr_with_hs(self): + strand = Cube(CR.UNIV_MR_WITH_HS["slides"][0]["cube"]).partitions[0] + + np.testing.assert_almost_equal( + strand.standard_deviation, + [ + 0.46426724, + 0.3584419, + 0.2351762, + 0.32431855, + 0.2891897, + 0.24800318, + 0.15104855, + 0.49700725, + 0.14466968, + ], + ) + np.testing.assert_almost_equal( + strand.standard_error, + [ + 0.00453318, + 0.00504326, + 0.00531142, + 0.00513733, + 0.00521646, + 0.0052914, + 0.00541038, + 0.00407718, + 0.00541584, + ], + ) + def it_places_insertions_on_a_reordered_dimension_in_the_right_position(self): """Subtotal anchors follow re-ordered rows. diff --git a/tests/integration/test_multiple_response.py b/tests/integration/test_multiple_response.py index 034032b60..3da1fc207 100644 --- a/tests/integration/test_multiple_response.py +++ b/tests/integration/test_multiple_response.py @@ -27,6 +27,17 @@ def test_proportions_simple_mr(): np.testing.assert_almost_equal(table_proportions, (0.6, 0.6666667, 0.0)) +def test_std_dev_err_simple_mr(): + strand = Cube(CR.SIMPLE_MR).partitions[0] + + np.testing.assert_almost_equal( + strand.standard_deviation, [0.4898979, 0.4714045, 0.0] + ) + np.testing.assert_almost_equal( + strand.standard_error, [0.2828427, 0.2357023, np.nan] + ) + + def test_1D_mr_with_means(): strand = Cube(CR.MR_MEAN_FILT_WGTD).partitions[0] np.testing.assert_almost_equal(