From: John Darrington Date: Mon, 28 Dec 2009 10:45:26 +0000 (+0100) Subject: FACTOR: Check that the number of factors does not exceed the number of variables X-Git-Tag: sav-api~409^2~6 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e01a02f3eb20eed09edc144bb579f2768e18ea4;p=pspp FACTOR: Check that the number of factors does not exceed the number of variables --- diff --git a/src/language/stats/factor.c b/src/language/stats/factor.c index 72a066408b..cfec4a9a40 100644 --- a/src/language/stats/factor.c +++ b/src/language/stats/factor.c @@ -1467,6 +1467,12 @@ do_factor (const struct cmd_factor *factor, struct casereader *r) msg (MW, _("The FACTOR criteria result in zero factors extracted. Therefore no analysis will be performed.")); goto finish; } + + if (idata->n_extractions > factor->n_vars) + { + msg (MW, _("The FACTOR criteria result in more factors than variables, which is not meaningful. No analysis will be performed.")); + goto finish; + } { const gsl_vector *extracted_eigenvalues = NULL;