bugPSPP - Bugs: bug #23567, Standardized regression...

 
 

bug #23567: Standardized regression coefficients reported incorrectly

Submitted by:  None
Submitted on:  Sat 14 Jun 2008 05:45:24 AM UTC  
 
Category: Numerical ErrorsSeverity: 7 - Major
Status: Ready for Test/ReviewAssigned to: Jason H Stover <jstover>
Open/Closed: ClosedRelease: None
Effort: 0.00

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 04 Sep 2008 01:36:30 PM UTC, comment #4:

Yes, since no one has complained about the fix.

Jason H Stover <jstover>
Project MemberIn charge of this item.
Thu 04 Sep 2008 12:49:33 PM UTC, comment #3:

Can this bug be closed now ?

John Darrington <jmd>
Project Administrator
Wed 25 Jun 2008 07:54:02 PM UTC, comment #2:

I checked in a fix for this. Let me know if it's still broken.

This change was a large one, part of a larger change to make linreg.c handle large data sets. I will start working on the rest of the change soon.

Jason H Stover <jstover>
Project MemberIn charge of this item.
Sun 15 Jun 2008 04:37:32 PM UTC, comment #1:

The way to fix this is to change linreg.c to store some more information in the struct coeff in the linreg cache, then to make linreg.c able to use this information. This should take a few days.

The particular problem is on line 256 of regression.q, where reg_stats_coeff must call gsl_vector_get to get the standard deviation for a variable in the model. To get the right value, reg_stats_coeff must know which subscript in the gsl_vector corresponds to the coefficient and variable in question. I could fix only the particular problem here, but that will leave the general problem of requiring code for a procedure to access stats for a model by directly accessing the internal data of the model struct.

The procedure code should be able to get values like this out of the linreg cache without knowing which subscript holds that value.

This fix will also make it easier for other models (besides those for linear regression) that use struct pspp_coeff's to get the necessary values without reaching into obscure arrays inside the model structure.

Jason H Stover <jstover>
Project MemberIn charge of this item.
Sat 14 Jun 2008 05:45:24 AM UTC, original submission:

Enter data for variables X & Y as:

X Y
__ __
1.00 2.00
2.00 2.00
3.00 3.00
4.00 4.00
5.00 5.00

The regression output includes unstandardized regression weights (B weights) of 0.80 and 0.80 for constant and X which is correct. However, the standardized/beta weights are reported as .61 and .00 for constant and X which is nonsense. In fact, 0.00 (or simply blank) is, by definition, the standardized coefficient for the constant while 0.61 is the correct beta weight for X.

So, PSPP reports the regression beta weights wrong. The weight for the constant should always be missing or zero (by definition) and the beta weight currently (0.6.0) shown for the constant should be for X.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jmd (Posted a comment)
  • -unavailable- added by jstover (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 08 Sep 2008 11:07:21 AM UTCjmdOpen/ClosedOpen=>Closed
    Wed 25 Jun 2008 07:54:02 PM UTCjstoverStatusIn Progress=>Ready for Test/Review
    Sun 15 Jun 2008 04:37:32 PM UTCjstoverSeverity5 - Average=>7 - Major
      StatusNone=>In Progress
      Assigned toNone=>jstover

    Back to the top


    Powered by Savane 3.1-cleanup1