From d342031c6d0e00840575fb01ab2ea136e674d600 Mon Sep 17 00:00:00 2001 From: Jason Stover Date: Sat, 11 Jul 2009 15:45:49 -0400 Subject: [PATCH] Return 0.0 for mean of a categorical variable. Fixes bug mentioned in bug report 26861. --- src/math/linreg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/math/linreg.c b/src/math/linreg.c index 8028697c..baf9cb73 100644 --- a/src/math/linreg.c +++ b/src/math/linreg.c @@ -641,7 +641,7 @@ double pspp_linreg_get_indep_variable_mean (pspp_linreg_cache *c, const struct v coef = pspp_linreg_get_coeff (c, v, NULL); return pspp_coeff_get_mean (coef); } - return GSL_NAN; + return 0.0; } void pspp_linreg_set_indep_variable_mean (pspp_linreg_cache *c, const struct variable *v, -- 2.30.2