|
I found this in the archive. I have been trying to present prettier correlation tables and thought I could use this. After some random walks in the basic scriptworld I have managed to convert the script to work, it also seems to work as a non-autoscript.
Unfortunately it is quite slow... The data is hidden and can be recovered by changing the text color in the table. Hopefully someone will find it useful... Remember to change the path to Global.wwd to your system. /PR By the way, the SPSSINC MODIFY TABLE does not work - all but the header is removed and lost. Corr_Table_Correlations_KeepLower.wwd ... * Sample data [Marta GG] *. INPUT PROGRAM. - VECTOR x(20). - LOOP #I = 1 TO 100. - LOOP #J = 1 TO 20. - COMPUTE x(#J) = NORMAL(1). - END LOOP. - END CASE. - END LOOP. - END FILE. END INPUT PROGRAM. EXE. * Peck *. SPSSINC MODIFY TABLES subtype="'Correlations'" SELECT="Sig. (2-tailed)" "N" DIMENSION= ROWS LEVEL = -1 PROCESS = PRECEDING HIDE=TRUE. [Output...] Correlations x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 Warning 16619,An error occured in the Pivot Table., |
|
Your MODIFY TABLES syntax should be this.
SPSSINC MODIFY TABLES SUBTYPE='"Correlations"' SELECT=0 DIMENSION=ROWS PROCESS=PRECEDING /styles customfunction= "formatcorrmat.cleancorr(hidecounts=True, hidel=False, lowertri=True, hideinsig=.05, emphasis=1.)". You can generate this from Utilities > Format Correlation Matrix. Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: PRogman <[hidden email]> To: [hidden email], Date: 03/03/2014 08:24 AM Subject: Re: [SPSSX-L] Simple Correlation Matrix Sent by: "SPSSX(r) Discussion" <[hidden email]> I found this in the archive. I have been trying to present prettier correlation tables and thought I could use this. After some random walks in the basic scriptworld I have managed to convert the script to work, it also seems to work as a non-autoscript. Unfortunately it is quite slow... The data is hidden and can be recovered by changing the text color in the table. Hopefully someone will find it useful... Remember to change the path to Global.wwd to your system. /PR By the way, the SPSSINC MODIFY TABLE does not work - all but the header is removed and lost. Corr_Table_Correlations_KeepLower.wwd <http://spssx-discussion.1045642.n5.nabble.com/file/n5724698/Corr_Table_Correlations_KeepLower.wwd> ... * Sample data [Marta GG] *. INPUT PROGRAM. - VECTOR x(20). - LOOP #I = 1 TO 100. - LOOP #J = 1 TO 20. - COMPUTE x(#J) = NORMAL(1). - END LOOP. - END CASE. - END LOOP. - END FILE. END INPUT PROGRAM. EXE. * Peck *. SPSSINC MODIFY TABLES subtype="'Correlations'" SELECT="Sig. (2-tailed)" "N" DIMENSION= ROWS LEVEL = -1 PROCESS = PRECEDING HIDE=TRUE. [Output...] Correlations x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 Warning 16619,An error occured in the Pivot Table., -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Simple-Correlation-Matrix-tp1090500p5724698.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Administrator
|
In reply to this post by Yochi Cohen-Charash
Someone recently resurrected this thread. Looking at it again a few years later, here are a couple of simple approaches for Yochi and others with the same basic question.
* In 2009, Yochi Cohen-Charash asked how to get a "simple correlation matrix, * without scripts and complicated commands". * Two methods are illustrated below. NEW FILE. DATASET CLOSE all. * Sample data--from Marta GG's macro example. INPUT PROGRAM. - VECTOR x(20). - LOOP #I = 1 TO 100. - LOOP #J = 1 TO 20. - COMPUTE x(#J) = NORMAL(1). - END LOOP. - END CASE. - END LOOP. - END FILE. END INPUT PROGRAM. EXECUTE. * [1] Use RELIABILITY to get the full matrix. RELIABILITY /VARIABLES=x1 TO x20 /SCALE('ALL VARIABLES') ALL /STATISTICS=CORRELATIONS. * I believe RELIABILITY uses PAIRWISE deletion. * To get LISTWISE deletion, set your own filter first. * [2] Use MVA to get the main diagonal and lower half. * This method requires the Missing Values Analysis add-on module. * One could also use OMS to suppress the unwanted bits of the MVA output. MVA VARIABLES=x1 TO x20 /NOUNIVARIATE /LISTWISE /PAIRWISE. HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
Administrator
|
Earlier, I said:
* I believe RELIABILITY uses PAIRWISE deletion. * To get LISTWISE deletion, set your own filter first. I was on my way to a meeting when I posted that, and didn't take the time to check. Now that I have checked, I can tell you I got it wrong! The correlations from RELIABILITY use LISTWISE deletion. For example... * Change path to folder where SPSS sample data files are stored. GET FILE = "C:\SPSSdata\survey_sample.sav". CORRELATIONS /VARIABLES=age to speduc /MISSING=PAIRWISE . CORRELATIONS /VARIABLES=age to speduc /MISSING=LISTWISE . RELIABILITY /VARIABLES=age to speduc /SCALE('ALL VARIABLES') ALL /STATISTICS=CORR. OUTPUT: CORRELATIONS + PAIRWISE: 1.000 -.175 -.350 -.345 -.161 -.175 1.000 .455 .386 .593 -.350 .455 1.000 .651 .414 -.345 .386 .651 1.000 .338 -.161 .593 .414 .338 1.000 CORRELATIONS + LISTWISE: 1.000 -.102 -.313 -.304 -.123 -.102 1.000 .477 .433 .581 -.313 .477 1.000 .655 .399 -.304 .433 .655 1.000 .366 -.123 .581 .399 .366 1.000 RELIABILITY: 1.000 -.102 -.313 -.304 -.123 -.102 1.000 .477 .433 .581 -.313 .477 1.000 .655 .399 -.304 .433 .655 1.000 .366 -.123 .581 .399 .366 1.000 HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
|
In reply to this post by Jon K Peck
I missed that extension! Great! It is much better than the script! I will also look into the different customstyles.py. That could be really useful.
Thank you! PR |
| Free forum by Nabble | Edit this page |
