From: John Darrington Date: Tue, 2 Jul 2013 17:37:08 +0000 (+0200) Subject: Added test to check that REGRESSION works with multiple dependent variables X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8603f5581522bca588e17a2155aff1bec3b0de1b;p=pspp Added test to check that REGRESSION works with multiple dependent variables --- diff --git a/tests/language/stats/regression.at b/tests/language/stats/regression.at index a3f5e62f85..f3b295adb6 100644 --- a/tests/language/stats/regression.at +++ b/tests/language/stats/regression.at @@ -146,6 +146,40 @@ AT_CHECK([cat outdata-g0.txt outdata-g1.txt | diff outdata-split.txt - ], [0], [ AT_CLEANUP +# Test that the procedure behaves sensibly when presented with +# multiple dependent variables +AT_SETUP([LINEAR REGRESSION multiple dependent variables]) +AT_DATA([regression.sps], [dnl +set seed = 2. +input program. +loop #c = 1 to 200. + compute x0 = rv.normal (0, 1). + compute x1 = rv.normal (0, 2). + compute err = rv.normal (0, 0.8). + compute y = 2 - 1.5 * x0 + 8.4 * x1 + err. + compute ycopy = y. + end case. +end loop. +end file. +end input program. + +regression + /variables = x0 x1 + /dependent = y ycopy + /statistics = all +]) + +AT_CHECK([pspp -O format=csv regression.sps > output], [0], [ignore]) + + +AT_CHECK([head -16 output > first], [0], []) +AT_CHECK([tail -16 output > second], [0], []) + +AT_CHECK([sed -e 's/ycopy/y/g' second | diff first -], [0], []) + + +AT_CLEANUP + # Tests the QR decomposition used by the REGRESSION command. AT_SETUP([LINEAR REGRESSION test of QR decomposition]) AT_DATA([regression.sps], [dnl