/[pspp]/pspp/src/regression.q
ViewVC logotype

Diff of /pspp/src/regression.q

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by jstover, Mon Nov 28 01:34:24 2005 UTC revision 1.18 by jstover, Mon Nov 28 02:37:26 2005 UTC
# Line 40  Line 40 
40  #include "var.h"  #include "var.h"
41  #include "vfm.h"  #include "vfm.h"
42    
43    #define REG_LARGE_DATA 1000
44    
45  /* (headers) */  /* (headers) */
46    
47    
# Line 644  run_regression (const struct casefile *c Line 646  run_regression (const struct casefile *c
646          (const struct variable *) design_matrix_col_to_var (X, i);          (const struct variable *) design_matrix_col_to_var (X, i);
647        assert (lcache->coeff[j].v != NULL);        assert (lcache->coeff[j].v != NULL);
648      }      }
649      /*
650        For large data sets, use QR decomposition.
651       */
652      if (n_data > sqrt (n_indep) && n_data > REG_LARGE_DATA)
653        {
654          lcache->method = PSPP_LINREG_SVD;
655        }
656    /*    /*
657       Find the least-squares estimates and other statistics.       Find the least-squares estimates and other statistics.
658     */     */
659    pspp_linreg ((const gsl_vector *) Y, X->m, &lopts, lcache);      pspp_linreg ((const gsl_vector *) Y, X->m, &lopts, lcache);
660    subcommand_statistics (cmd.a_statistics, lcache);    subcommand_statistics (cmd.a_statistics, lcache);
661    gsl_vector_free (Y);    gsl_vector_free (Y);
662    design_matrix_destroy (X);    design_matrix_destroy (X);

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26