[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #6488] test for QR decomposition in REGRESSION

From: John Darrington
Subject: Re: [patch #6488] test for QR decomposition in REGRESSION
Date: Fri, 11 Apr 2008 12:54:26 +0800
User-agent: Mutt/1.5.13 (2006-08-11)

Maybe this could be overcome by adding a small random error, eg

compute y = rv.normal (1.23, 0.01) + rv.normal (4.56, 0.01) * v1 ...

Obviously, we would need to fix the rng seed too.
But the theory here is starting to get outside of my field of
expertise.    So I'll leave it up to you to decide what is best.


On Wed, Apr 09, 2008 at 06:44:29PM +0000, Jason H Stover wrote:

     Randomly generating the data might work, but then the test won't be a
     straightforward diff. If the least squares line passes exactly through the
     data, the standard errors of the estimated coefficients will be exactly 0.
     This stored standard error will be 0 to machine precision, or close to 0, 
     will then be used in the denominator of any test statistics appearing in 
     't' and 'F' columns of the output tables. Since these values are close to, 
     not exactly 0, and also random, dividing by them will produce random, huge
     test statistics which will fail the diff. That's what happened to me when I
     ran the randomly-generated data through make check (output below).
     The problem is that the true value of the test statistic is infinity. So to
     use the randomly-generated data in the test, we either need to:
     1. Alter the test so it doesn't just diff the results, but actually 
     the relative errors inside the tables, or
     2. Change the code to make REGRESSION report 0.0 and FP_INFINITE for the 
     squared error and test statistics, respectively. I suspect this approach 
     cause other, bigger problems elsewhere.
     Here is the failed test output:
     < #        |Regression#     1.01E+010|   2|   5.1E+009|6.1E+032|       
     > #        |Regression#     1.06E+010|   2|   5.3E+009|9.8E+031|       
     < #        |Total     #     1.01E+010|1499|           |        |           
     > #        |Total     #     1.06E+010|1499|           |        |           
     < #        |(Constant)#1.23|       .00| .00|6.18E+012|         .00#
     < #        |    v1    #4.56|       .00| .38|2.65E+016|         .00#
     < #        |    v2    #7.89|       .00| .00|2.31E+016|         .00#
     > #        |(Constant)#1.23|       .00| .00|2.48E+012|         .00#
     > #        |    v1    #4.56|       .00| .37|1.04E+016|         .00#
     > #        |    v2    #7.89|       .00| .00|8.95E+015|         .00#
     run program
     FAIL: tests/command/

PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]