[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] Changes to pspp/src/regression.q
From: |
Jason H Stover |
Subject: |
[Pspp-cvs] Changes to pspp/src/regression.q |
Date: |
Sun, 27 Nov 2005 21:37:26 -0500 |
Index: pspp/src/regression.q
diff -u pspp/src/regression.q:1.17 pspp/src/regression.q:1.18
--- pspp/src/regression.q:1.17 Mon Nov 28 01:34:24 2005
+++ pspp/src/regression.q Mon Nov 28 02:37:26 2005
@@ -40,6 +40,8 @@
#include "var.h"
#include "vfm.h"
+#define REG_LARGE_DATA 1000
+
/* (headers) */
@@ -644,10 +646,17 @@
(const struct variable *) design_matrix_col_to_var (X, i);
assert (lcache->coeff[j].v != NULL);
}
+ /*
+ For large data sets, use QR decomposition.
+ */
+ if (n_data > sqrt (n_indep) && n_data > REG_LARGE_DATA)
+ {
+ lcache->method = PSPP_LINREG_SVD;
+ }
/*
Find the least-squares estimates and other statistics.
*/
- pspp_linreg ((const gsl_vector *) Y, X->m, &lopts, lcache);
+ pspp_linreg ((const gsl_vector *) Y, X->m, &lopts, lcache);
subcommand_statistics (cmd.a_statistics, lcache);
gsl_vector_free (Y);
design_matrix_destroy (X);