bugPSPP - Bugs: bug #55825, Feature Request: Improved Linear...

 
 

bug #55825: Feature Request: Improved Linear Regression Diagnostics

Submitted by:  Matt <mattakatdat>
Submitted on:  Mon 04 Mar 2019 02:27:23 PM UTC  
 
Category:  Other Severity:  1 - Wishlist
Status:  None Assigned to:  None
Open/Closed:  Open Release:  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.

 

( Jump to the original submission)

Sat 20 Apr 2019 06:18:46 AM UTC, comment #7:

This patch isn't going to work except in certain special situations. For example if neither RESID nor PRES is selected but the scatterplot is, then things will break.

There is a fundamental issue we need to address before we can look at the GUI here. We need to implement the /SCATTERPLOT subcommand for linear regression.

See https://www.ibm.com/support/knowledgecenter/en/SSLVMB_22.0.0/com.ibm.spss.statistics.reference/spss/base/syn_regression_scatterplot.htm

Would you like to have a go at that? You'll need to implement this in src/language/stats/regression.c

John Darrington <jmd>
Project Administrator
Fri 19 Apr 2019 02:58:08 PM UTC, comment #6:

I made a gui patch to graph a plot for residual vs fitted on regression analyze. For now it graph only PRED1 and RESID1. I looking for a resolve to graph PRED2,3... and RESID2,3... You can test it.Attached screenshot and patch.

(file #46799, file #46800)

Ayhan Yalçınsoy <ayhanyalcinsoy>
Sat 30 Mar 2019 05:26:36 PM UTC, comment #5:

Hi,
I added Tol gui to regression dialog. Attatched gui and output screenshot.

(file #46671, file #46672, file #46673)

Ayhan Yalçınsoy <ayhanyalcinsoy>
Mon 11 Mar 2019 06:40:07 PM UTC, comment #4:

John,

Thank you for getting the Collin package rolling. I have not been able to test yet because I can't figure out how to compile the files that are laying around, but I'll test things out once I can figure it out.

Matt <mattakatdat>
Thu 07 Mar 2019 05:50:53 PM UTC, comment #3:

I've pushed a change implementing the /STATISTICS COLLIN option that you requested.

Please check it out and see if it works for you.

John Darrington <jmd>
Project Administrator
Mon 04 Mar 2019 06:45:48 PM UTC, comment #2:

John,

Here's what I'm aware of. I teach basic SPSS, but I don't use it in my own work, so I apologize for my lack of knowledge on SPSS syntax.

1) VIFs are under SPSS's "Statistics" option in the regression GUI, listed as "collinearity diagnostics." It is called via the COLLIN option, such as in the fake data illustration below:

REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA COLLIN
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT VAR00001
/METHOD=ENTER VAR00002

2) Cook's D can be attained after a regression model in SPSS by adding /SAVE COOK as an option to the regression command. For instance:

REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT VAR00001
/METHOD=ENTER VAR00002
/SAVE COOK.

3) In a program like Stata you can get this via the command "cprplot" after a regression was run. In SPSS it isn't as straightforward, but someone else might know better. I'd say this is the lowest priority, as a simple scatter plot between two variables will get us what we need, which is doable in current PSPP. It might be an extension of PSPP instead of a match of SPSS's features.

4) Residual vs fitted plots are implemented in SPSS via a plot option attached to the regression commands. This usually looks something like: SCATTERPLOT=(*ZPRED ,*ZRESID) in syntax. See below, for instance, for a full command:

REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA COLLIN TOL
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT VAR00001
/METHOD=ENTER VAR00002
/PARTIALPLOT ALL
/SCATTERPLOT=(*ZPRED ,*ZRESID)

Matt <mattakatdat>
Mon 04 Mar 2019 06:11:55 PM UTC, comment #1:

Do these analyses correspond to any SPSS features? If so do you have an example of the syntax. or would this be a PSPP extension?

John Darrington <jmd>
Project Administrator
Mon 04 Mar 2019 02:27:23 PM UTC, original submission:

PSPP is amazing, and I would love to use it in my college classrooms. However, right now it lacks the features needed to actually conduct regression analyses responsibly by checking your assumptions. There are dozens of these, of course, but I think that three in particular would be very helpful to putting PSPP on the map for introductory statistics courses looking for a free GUI based teaching tool. I am not a programmer, but I feel like I should give suggestions on what would be most useful for PSPP in teaching a "second class" on regression

1) OLS Assumption #1: Negligible multicollinearity: The ability to estimate Variance Inflation Factors would give a tool for testing the presence of multicollinearity.

References: Thiel's Principles of Econometrics; basic computations can be found here: https://newonlinecourses.science.psu.edu/stat501/node/347/

2) Assumption 2: Outliers are handled and non-influential- The ability to identify outliers in multivariate models by calculating Cook's Distance (aka Cook's D statistics) would help with finding outliers.

Reference: Cook, R. Dennis (March 1979). "Influential Observations in Linear Regression". Journal of the American Statistical Association. American Statistical Association. 74 (365): 169–174.

3) Assumption 3: Linearity: Component-plus-residual plots can visually identify non-linear associations in many cases.

Overview: https://www.stat.washington.edu/pds/stat423/Documents/LectureNotes/notes.423.ch12.pdf

4) Assumption 4: Heteroskedasticity: Residual vs fitted plots, which PSPP all but supports already since it can output residuals and predicted values. It would just be a matter of temporarily taking those values, standardizing them, and scatter plotting the two.

There are, of course, other assumptions and tests, but this is a good start. I am happy to test these features if they are implemented.

Matt <mattakatdat>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46800:  scatter_plot.patch added by ayhanyalcinsoy (4KiB - text/x-patch)
file #46671:  tol_ui.png added by ayhanyalcinsoy (9KiB - image/png)
file #46673:  tol_output.png added by ayhanyalcinsoy (69KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ayhanyalcinsoy (Updated the item)
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by mattakatdat (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-19 ayhanyalcinsoy Attached File- => Added regression_scatterplot.png, #46799
        Attached File- => Added scatter_plot.patch, #46800
    2019-03-30 ayhanyalcinsoy Attached File- => Added tol_ui.png, #46671
        Attached File- => Added regression_tol_gui.patch, #46672
        Attached File- => Added tol_output.png, #46673
    2019-03-04 jmd Severity5 - Average => 1 - Wishlist

    Back to the top


    Powered by Savane 3.4