Simple Correlation Matrix

classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Simple Correlation Matrix

Mark.W.Andrews-2

Hi all,

 

Anyone know if there is a trick to producing a correlation matrix with coefficients only (without significance and N in the output)? The syntax manual seems to indicate that this is possible with the Print subcommand, but does not explain how. I noticed you can get the desired output with a factor analysis, but it seems that there should be an easier way.

 

Thanks,

Mark

 

Mark W. Andrews| Research Manager | 301.572.0331 | [hidden email]

ICF MACRO| 11785 Beltsville Drive, Calverton, MD 20705 | www.icfmacro.com

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Bruce Weaver
Administrator
Mark.W.Andrews-2 wrote
Hi all,

Anyone know if there is a trick to producing a correlation matrix with coefficients only (without significance and N in the output)? The syntax manual seems to indicate that this is possible with the Print subcommand, but does not explain how. I noticed you can get the desired output with a factor analysis, but it seems that there should be an easier way.

Thanks,
Mark
You could always use RELIABILITY.  E.g., instead of:

correlation /variables = v1 to v5 .

try...

RELIABILITY
  /VARIABLES= v1 to v5
  /SCALE('ALL VARIABLES') ALL
  /MODEL=ALPHA
  /STATISTICS=CORR.

--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Mark Webb-5
In reply to this post by Mark.W.Andrews-2
Double click your correlation output.
Choose pivot / pivot trays.
Move statistics from rows into levels pivot tray.
Mark Webb

+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]


Mark.W.Andrews wrote:

Hi all,

 

Anyone know if there is a trick to producing a correlation matrix with coefficients only (without significance and N in the output)? The syntax manual seems to indicate that this is possible with the Print subcommand, but does not explain how. I noticed you can get the desired output with a factor analysis, but it seems that there should be an easier way.

 

Thanks,

Mark

 

Mark W. Andrews| Research Manager | 301.572.0331 | [hidden email]

ICF MACRO| 11785 Beltsville Drive, Calverton, MD 20705 | www.icfmacro.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
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Peck, Jon

Or, if you do this a lot and want to automate the process, use the SPSSINC MODIFY TABLES extension command available from SPSS Developer Central (www.spss.com).  (Requires v17 or later and Python plugin).

 

Here’s the syntax that would do this, run right after the Correlations command.  It hides the rows with the indicated labels.

 

SPSSINC MODIFY TABLES subtype="'Correlations'"

SELECT="Sig. (2-tailed)" "N"

DIMENSION= ROWS

LEVEL = -1  PROCESS = PRECEDING HIDE=TRUE.

 

Regards,

Jon Peck

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Mark Webb
Sent: Monday, August 31, 2009 8:56 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Simple Correlation Matrix

 

Double click your correlation output.
Choose pivot / pivot trays.
Move statistics from rows into levels pivot tray.

Mark Webb
 
+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]



Mark.W.Andrews wrote:

Hi all,

 

Anyone know if there is a trick to producing a correlation matrix with coefficients only (without significance and N in the output)? The syntax manual seems to indicate that this is possible with the Print subcommand, but does not explain how. I noticed you can get the desired output with a factor analysis, but it seems that there should be an easier way.

 

Thanks,

Mark

 

Mark W. Andrews| Research Manager | 301.572.0331 | [hidden email]

ICF MACRO| 11785 Beltsville Drive, Calverton, MD 20705 | www.icfmacro.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

Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

John F Hall
In reply to this post by Mark.W.Andrews-2
Used to be:
 
corr  <varlist>  /print nosig.
 
..but they seem to have disabled it, at least it doesn't work on my machine.
----- Original Message -----
Sent: Monday, August 31, 2009 2:19 PM
Subject: Simple Correlation Matrix

Hi all,

 

Anyone know if there is a trick to producing a correlation matrix with coefficients only (without significance and N in the output)? The syntax manual seems to indicate that this is possible with the Print subcommand, but does not explain how. I noticed you can get the desired output with a factor analysis, but it seems that there should be an easier way.

 

Thanks,

Mark

 

Mark W. Andrews| Research Manager | 301.572.0331 | [hidden email]

ICF MACRO| 11785 Beltsville Drive, Calverton, MD 20705 | www.icfmacro.com

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

John F Hall
In reply to this post by Mark Webb-5
Nice one!  Just tried it, but why can't SPSS just leave things alone?  Some of us are mere researchers, not computer wizards or statistical gurus (or by now corporate financiers).  See my slide show for how things used to be:  Old Dog, Old Tricks 1 - Computers and surveys before SPSS: history and background
 
----- Original Message -----
Sent: Monday, August 31, 2009 4:56 PM
Subject: Re: Simple Correlation Matrix

Double click your correlation output.
Choose pivot / pivot trays.
Move statistics from rows into levels pivot tray.
Mark Webb

+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]


Mark.W.Andrews wrote:

Hi all,

Anyone know if there is a trick to producing a correlation matrix with coefficients only (without significance and N in the output)? The syntax manual seems to indicate that this is possible with the Print subcommand, but does not explain how. I noticed you can get the desired output with a factor analysis, but it seems that there should be an easier way.

Thanks,

Mark

Mark W. Andrews| Research Manager | 301.572.0331 | [hidden email]

ICF MACRO| 11785 Beltsville Drive, Calverton, MD 20705 | www.icfmacro.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
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Bruce Weaver
Administrator
In reply to this post by John F Hall
John F Hall-2 wrote
  ----- Original Message -----
  From: Mark.W.Andrews
  To: SPSSX-L@LISTSERV.UGA.EDU
  Sent: Monday, August 31, 2009 2:19 PM
  Subject: Simple Correlation Matrix


  Hi all,

   

  Anyone know if there is a trick to producing a correlation matrix with coefficients only (without significance and N in the output)? The syntax manual seems to indicate that this is possible with the Print subcommand, but does not explain how. I noticed you can get the desired output with a factor analysis, but it seems that there should be an easier way.

   

  Thanks,

  Mark

   

        Mark W. Andrews| Research Manager | 301.572.0331 | mark.w.andrews@macrointernational.com
       
        ICF MACRO| 11785 Beltsville Drive, Calverton, MD 20705 | www.icfmacro.com
       

   
Used to be:

corr  <varlist>  /print nosig.

..but they seem to have disabled it, at least it doesn't work on my machine.

 

I believe NOSIG controls whether or not the asterisks that flag significant correlations appear.

--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Yochi Cohen-Charash
In reply to this post by John F Hall

Hi all,

 

Does anyone have an idea about how to get only the lower half of the correlation matrix?

 

Thanks much

 

Yochi

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Monday, August 31, 2009 12:13 PM
To: [hidden email]
Subject: Re: Simple Correlation Matrix

 

Nice one!  Just tried it, but why can't SPSS just leave things alone?  Some of us are mere researchers, not computer wizards or statistical gurus (or by now corporate financiers).  See my slide show for how things used to be:  Old Dog, Old Tricks 1 - Computers and surveys before SPSS: history and background

 

----- Original Message -----

Sent: Monday, August 31, 2009 4:56 PM

Subject: Re: Simple Correlation Matrix

 

Double click your correlation output.
Choose pivot / pivot trays.
Move statistics from rows into levels pivot tray.

Mark Webb
 
+27 21 786 4379
+27 72 199 1000
Skype - webbmark
[hidden email]



Mark.W.Andrews wrote:

Hi all,

Anyone know if there is a trick to producing a correlation matrix with coefficients only (without significance and N in the output)? The syntax manual seems to indicate that this is possible with the Print subcommand, but does not explain how. I noticed you can get the desired output with a factor analysis, but it seems that there should be an easier way.

Thanks,

Mark

Mark W. Andrews| Research Manager | 301.572.0331 | [hidden email]

ICF MACRO| 11785 Beltsville Drive, Calverton, MD 20705 | www.icfmacro.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

Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Marta Garcia-Granero
Hi Yochi:

Yochi Cohen-Charash wrote:
>
>
>
> Does anyone have an idea about how to get only the lower half of the
> correlation matrix?
>
Time ago I answered a very similar question, but the result had to be
exported to a TXT lower triangular matrix (I don't know if you want a
SAV file or a TXT file, you don't mention it). Anyway, the macro I
posted could be used as a starting point (you can read the txt file to
Excel, or back to SPSS...). Warning: SPSS 14 or newer is needed.

DEFINE !EXPORT(!POSITIONAL !CMDEND).
DATASET NAME OriginalData.
DATASET DECLARE CorrelationMatrix WINDOW=HIDDEN.
CORRELATIONS
  /VARIABLES=!1
  /PRINT=TWOTAIL SIG
  /MATRIX=OUT('CorrelationMatrix')
  /MISSING=LISTWISE .
DATASET ACTIVATE CorrelationMatrix.
COMPUTE id=$casenum.
PRESERVE.
SET ERRORS=NONE RESULTS=NONE.
RANK id /n into nvars /PRINT = NO.
RESTORE.
STRING last(A8).
DO IF $casenum EQ 1.
- COMPUTE lastcol=7*(nvars-3).
- COMPUTE last=STRING(lastcol,F4).
- !LET !lastf=!UNQUOTE(last).
WRITE OUTFILE 'c:\temp\Matrixcode.sps'
 /"MATRIX."
 /"MGET /FILE=*."
 /"RELEASE MN,SD,NC."
 /"WRITE CR"
 /" /OUTFILE='C:\Temp\LowerTriangularMatrix.txt'"
 /" /FIELD=1 TO "!lastf
 /" /MODE=TRIANGULAR"
 /" /FORMAT='F7.4'."
 /"PRINT /TITLE='Triangular correlation matrix exported to
C:\Temp\LowerTriangularMatrix.txt'."
 /"END MATRIX.".
END IF.
CACHE. /* Necessary to avoid an error     *.
EXE.   /* including the syntax file later *.
DELETE VARIABLES id nvars lastcol last.
INSERT FILE='C:\Temp\Matrixcode.sps'.
DATASET ACTIVATE OriginalData.
DATASET CLOSE CorrelationMatrix.
!ENDDEFINE.

* Sample data (replace by your own) with 20 variables *.
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.

* MACRO call *.
!EXPORT x1 TO x20.

HTH,
Marta GG

--
For miscellaneous SPSS related statistical stuff, visit:
http://gjyp.nl/marta/

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Bruce Weaver
Administrator
In reply to this post by Yochi Cohen-Charash
Yochi Cohen-Charash wrote
Hi all,

Does anyone have an idea about how to get only the lower half of the
correlation matrix?

Thanks much

Yochi
I don't have SPSS on this machine, so some of the terms may be off a bit.  But...

   Edit - Options - Autoscripts, and check the autoscript for correlations.

--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Yochi Cohen-Charash
Hi Bruce,

Thanks much, but this solution doesn't work. I tried it several times before
and now.

Any other ideas?

Thanks much,

Yochi



-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bruce Weaver
Sent: Monday, September 07, 2009 8:31 AM
To: [hidden email]
Subject: Re: Simple Correlation Matrix

Yochi Cohen-Charash wrote:

>
> Hi all,
>
> Does anyone have an idea about how to get only the lower half of the
> correlation matrix?
>
> Thanks much
>
> Yochi
>
>

I don't have SPSS on this machine, so some of the terms may be off a bit.
But...

   Edit - Options - Autoscripts, and check the autoscript for correlations.



-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is for posting only, and is not monitored
regularly.
If you wish to send me an e-mail, please use the address shown in my sig
file.
--
View this message in context:
http://www.nabble.com/Simple-Correlation-Matrix-tp25224408p25329764.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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Bruce Weaver
Administrator
Yochi Cohen-Charash wrote
Hi Bruce,

Thanks much, but this solution doesn't work. I tried it several times before
and now.

Any other ideas?

Thanks much,

Yochi
Good question, Yochi.  I can't get it to work either (in v17).  I know I have done it in the past though.  IIRC, it was very straightforward in previous versions--something along the lines of checking a box, or selecting something and clicking APPLY or OK.  Perhaps someone else can tell us where we're going wrong.

--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Bruce Weaver
Administrator
Bruce Weaver wrote
Yochi Cohen-Charash wrote
Hi Bruce,

Thanks much, but this solution doesn't work. I tried it several times before
and now.

Any other ideas?

Thanks much,

Yochi
Good question, Yochi.  I can't get it to work either (in v17).  I know I have done it in the past though.  IIRC, it was very straightforward in previous versions--something along the lines of checking a box, or selecting something and clicking APPLY or OK.  Perhaps someone else can tell us where we're going wrong.
Some of the reading I did suggested that file "Correlations_Table_Correlations_Create.sbs" is needed for the autoscript method, but I can't find it on my machine.  (Again, this is with v17).  We have an old machine that is still running v11, so I took a look at it.  Rather than having a separate file for formatting the correlation matrix, the "Correlations_Table_Correlations_Create" script is included (along with several other scripts) in "Autoscript.sbs".  I tried copying Autoscript.sbs to my machine and using it (i.e., I changed "disabled" to "enabled" for the correlation table script).  But then, when I ran a correlation, I got the following error message:

WinWrap Basic
JCAdapter not yet initialized.

My guess is that at some point, SPSS changed from Sax Basic to WinWrap Basic, and that it is looking for a script file with a .wwd extension rather than .sbs.  But I'm in over my head here, and need advice from someone who actually knows what  they're talking about.  ;-)

Hang on a second...I just found this on the Tech Support website:

Scripting in SPSS version 16.0 and beyond.

The available scripting languages in SPSS 16.0 depend on your platform. For Windows, the available scripting languages are Basic, which is installed with the Base system, and the Python programming language. For all other platforms, scripting is available with the Python programming language.

SPSS 16.0 introduced Python as the cross-platform scripting language for SPSS on Windows, Mac and Linux to allow users to automate many functions, including customizing pivot tables.

Legacy SAX Basic users must manually convert any custom autoscripts. Information on converting legacy SAX Basic autoscripts can be found under Compatibility with Versions Prior to SPSS 16.0 in the SPSS 16.0 online help (select Topics under the Help menu in SPSS 16.0 for Windows). Also included in this section is information regarding the discontinuation of support for IGraph and SPSS Maps scripting.

There is no intention of ceasing the operability of the Basic interface in SPSS 16.0, or the upcoming SPSS 17.0, however further development in scripting will only be conducted for the Python interface. All users are encouraged to adopt or move to Python scripting for automation purposes.

--- End of website info ---

So, I suspect the answer from SPSS will be, "Do it with Python".  
--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Peck, Jon
See below.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Tuesday, September 08, 2009 8:28 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Simple Correlation Matrix

Bruce Weaver wrote:

Some of the reading I did suggested that file
"Correlations_Table_Correlations_Create.sbs" is needed for the autoscript
method, but I can't find it on my machine.  (Again, this is with v17).  We
have an old machine that is still running v11, so I took a look at it.
Rather than having a separate file for formatting the correlation matrix,
the "Correlations_Table_Correlations_Create" script is included (along with
several other scripts) in "Autoscript.sbs".  I tried copying Autoscript.sbs
to my machine and using it (i.e., I changed "disabled" to "enabled" for the
correlation table script).  But then, when I ran a correlation, I got the
following error message:

WinWrap Basic
JCAdapter not yet initialized.

My guess is that at some point, SPSS changed from Sax Basic to WinWrap
Basic, and that it is looking for a script file with a .wwd extension rather
than .sbs.  But I'm in over my head here, and need advice from someone who
actually knows what  they're talking about.  ;-)

Hang on a second...I just found this on the Tech Support website:

Scripting in SPSS version 16.0 and beyond.

The available scripting languages in SPSS 16.0 depend on your platform. For
Windows, the available scripting languages are Basic, which is installed
with the Base system, and the Python programming language. For all other
platforms, scripting is available with the Python programming language.

SPSS 16.0 introduced Python as the cross-platform scripting language for
SPSS on Windows, Mac and Linux to allow users to automate many functions,
including customizing pivot tables.

Legacy SAX Basic users must manually convert any custom autoscripts.
Information on converting legacy SAX Basic autoscripts can be found under
Compatibility with Versions Prior to SPSS 16.0 in the SPSS 16.0 online help
(select Topics under the Help menu in SPSS 16.0 for Windows). Also included
in this section is information regarding the discontinuation of support for
IGraph and SPSS Maps scripting.

There is no intention of ceasing the operability of the Basic interface in
SPSS 16.0, or the upcoming SPSS 17.0, however further development in
scripting will only be conducted for the Python interface. All users are
encouraged to adopt or move to Python scripting for automation purposes.

--- End of website info ---

So, I suspect the answer from SPSS will be, "Do it with Python".
[peck]
No, that is not the answer from SPSS.  Although it would be easy to do this task with Python using the SPSSINC MODIFY TABLES extension command, you can easily convert an old Basic autoscript.  In most cases that amounts to adding one line of code to the script as described in the help and saving it as a separate file.  That change was made so that the same script could be used either as an autoscript or a regular script.

If someone wants to do this with MODIFY TABLES, though, I can add a tiny function to the customstylefunctions module that comes with the command that would blank the upper or lower triangle.

Regards,
Jon Peck

=====================
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
Reply | Threaded
Open this post in threaded view
|

IRT and SPSS

William Dudley WNDUDLEY
In reply to this post by Bruce Weaver

Does SPSS (PASW) have a module for Item Response Theory?

William N. Dudley, PhD
Associate Dean for Research
The School of Health and Human Performance Office of Research
The University of North Carolina at Greensboro
126 HHP Building, PO Box 26170
Greensboro, NC 27402-6170
VOICE 336.2562475
FAX 336.334.3238
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Bruce Weaver
Administrator
In reply to this post by Peck, Jon
Peck, Jon wrote
See below.

--- snip ---
[BW]
So, I suspect the answer from SPSS will be, "Do it with Python".

[peck]
No, that is not the answer from SPSS.  Although it would be easy to do this task with Python using the SPSSINC MODIFY TABLES extension command, you can easily convert an old Basic autoscript.  In most cases that amounts to adding one line of code to the script as described in the help and saving it as a separate file.  That change was made so that the same script could be used either as an autoscript or a regular script.

If someone wants to do this with MODIFY TABLES, though, I can add a tiny function to the customstylefunctions module that comes with the command that would blank the upper or lower triangle.

Regards,
Jon Peck
Hi Jon.  I take issue with that "easily".  ;-)  I suspect it's easy for visual basic programmers, but I'm not one of them.  (I was more a Turbo Pascal guy back in the day.)  I've tried to follow the instructions for converting the legacy autoscript for correlation matrices to something that will run in v17, but I'm having a problem at this step:

* Use the scriptContext object (always available) to get the values required by the autoscript, such as the output item that triggered the autoscript.

An example is given (for Descriptives_Table_DescriptiveStatistics_Create), but I am unable to work out from it exactly what additions/changes I have to make to the autoscript that formats correlation matrices.  I think a lot of users are not visual basic programmers, and so would find it helpful if converted legacy autoscripts were available for download from the Tech Support website.  Is this possible?

Thanks,
Bruce
--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Peck, Jon
I don't have that script - I'll take a look if you want to send it, but the general procedure is just to add a line like
    Set objPivotTable = scriptContext.GetOutputItem()
and removing the parameter list from the Sub statement.
That gives you the equivalent of the objPivotTable you would previously have gotten through the parameter list.
From there on, the code would be the same.

To use this as an autoscript, you attach it to the particular table type in Edit>Options>Script and it will be triggered whenever a table of the specified type is created.

HTH,
Jon

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Bruce Weaver
Sent: Tuesday, September 08, 2009 9:13 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Simple Correlation Matrix

Peck, Jon wrote:

>
> See below.
>
> --- snip ---
> [BW]
> So, I suspect the answer from SPSS will be, "Do it with Python".
>
> [peck]
> No, that is not the answer from SPSS.  Although it would be easy to do
> this task with Python using the SPSSINC MODIFY TABLES extension command,
> you can easily convert an old Basic autoscript.  In most cases that
> amounts to adding one line of code to the script as described in the help
> and saving it as a separate file.  That change was made so that the same
> script could be used either as an autoscript or a regular script.
>
> If someone wants to do this with MODIFY TABLES, though, I can add a tiny
> function to the customstylefunctions module that comes with the command
> that would blank the upper or lower triangle.
>
> Regards,
> Jon Peck
>

Hi Jon.  I take issue with that "easily".  ;-)  I suspect it's easy for
visual basic programmers, but I'm not one of them.  (I was more a Turbo
Pascal guy back in the day.)  I've tried to follow the instructions for
converting the legacy autoscript for correlation matrices to something that
will run in v17, but I'm having a problem at this step:

* Use the scriptContext object (always available) to get the values required
by the autoscript, such as the output item that triggered the autoscript.

An example is given (for Descriptives_Table_DescriptiveStatistics_Create),
but I am unable to work out from it exactly what additions/changes I have to
make to the autoscript that formats correlation matrices.  I think a lot of
users are not visual basic programmers, and so would find it helpful if
converted legacy autoscripts were available for download from the Tech
Support website.  Is this possible?

Thanks,
Bruce


-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is for posting only, and is not monitored
regularly.
If you wish to send me an e-mail, please use the address shown in my sig
file.
--
View this message in context: http://www.nabble.com/Simple-Correlation-Matrix-tp25224408p25348154.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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Bruce Weaver
Administrator
Peck, Jon wrote
I don't have that script - I'll take a look if you want to send it, but the general procedure is just to add a line like
    Set objPivotTable = scriptContext.GetOutputItem()
and removing the parameter list from the Sub statement.
That gives you the equivalent of the objPivotTable you would previously have gotten through the parameter list.
From there on, the code would be the same.

To use this as an autoscript, you attach it to the particular table type in Edit>Options>Script and it will be triggered whenever a table of the specified type is created.

HTH,
Jon
Thanks Jon.  I've sent you a message from my real e-mail address with the old autoscript file and my attempt to create a new autoscript file for formatting the correlation matrix.

Bruce
--
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/).
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Yochi Cohen-Charash
In reply to this post by Peck, Jon
Bruce,

Thanks much for continuing the trend.

Jon, I must admit I only want to get a simple correlation matrix, without
scripts and complicated commands I need to write for that. I am a
psychologist, not a programmer or a statistician, not am I a fan of these.
Any way you can make it easy for people like me, working with version 17
(after upgrading from version 11.5, in which it was very easy to get)?

Thanks much,

Yochi

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Peck, Jon
Sent: Tuesday, September 08, 2009 12:29 PM
To: [hidden email]
Subject: Re: Simple Correlation Matrix

I don't have that script - I'll take a look if you want to send it, but the
general procedure is just to add a line like
    Set objPivotTable = scriptContext.GetOutputItem()
and removing the parameter list from the Sub statement.
That gives you the equivalent of the objPivotTable you would previously have
gotten through the parameter list.
From there on, the code would be the same.

To use this as an autoscript, you attach it to the particular table type in
Edit>Options>Script and it will be triggered whenever a table of the
specified type is created.

HTH,
Jon

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bruce Weaver
Sent: Tuesday, September 08, 2009 9:13 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Simple Correlation Matrix

Peck, Jon wrote:

>
> See below.
>
> --- snip ---
> [BW]
> So, I suspect the answer from SPSS will be, "Do it with Python".
>
> [peck]
> No, that is not the answer from SPSS.  Although it would be easy to do
> this task with Python using the SPSSINC MODIFY TABLES extension command,
> you can easily convert an old Basic autoscript.  In most cases that
> amounts to adding one line of code to the script as described in the help
> and saving it as a separate file.  That change was made so that the same
> script could be used either as an autoscript or a regular script.
>
> If someone wants to do this with MODIFY TABLES, though, I can add a tiny
> function to the customstylefunctions module that comes with the command
> that would blank the upper or lower triangle.
>
> Regards,
> Jon Peck
>

Hi Jon.  I take issue with that "easily".  ;-)  I suspect it's easy for
visual basic programmers, but I'm not one of them.  (I was more a Turbo
Pascal guy back in the day.)  I've tried to follow the instructions for
converting the legacy autoscript for correlation matrices to something that
will run in v17, but I'm having a problem at this step:

* Use the scriptContext object (always available) to get the values required
by the autoscript, such as the output item that triggered the autoscript.

An example is given (for Descriptives_Table_DescriptiveStatistics_Create),
but I am unable to work out from it exactly what additions/changes I have to
make to the autoscript that formats correlation matrices.  I think a lot of
users are not visual basic programmers, and so would find it helpful if
converted legacy autoscripts were available for download from the Tech
Support website.  Is this possible?

Thanks,
Bruce


-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is for posting only, and is not monitored
regularly.
If you wish to send me an e-mail, please use the address shown in my sig
file.
--
View this message in context:
http://www.nabble.com/Simple-Correlation-Matrix-tp25224408p25348154.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

=====================
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

=====================
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
Reply | Threaded
Open this post in threaded view
|

Re: Simple Correlation Matrix

Peck, Jon
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Yochi Cohen-Charash
Sent: Tuesday, September 08, 2009 1:59 PM
To: [hidden email]
Subject: Re: [SPSSX-L] Simple Correlation Matrix

Bruce,

Thanks much for continuing the trend.

Jon, I must admit I only want to get a simple correlation matrix, without
scripts and complicated commands I need to write for that. I am a
psychologist, not a programmer or a statistician, not am I a fan of these.
Any way you can make it easy for people like me, working with version 17
(after upgrading from version 11.5, in which it was very easy to get)?

Thanks much,

Yochi
[peck] Users want an infinite number of variations on the output, which is why we have provided a scripting engine and, indeed, the pivot table facilities.  In this case, I have no idea why such an option would have disappeared unless it happened when the output was converted to pivot table format.  That was probably before 11.5, though.

If you would like to see this built in as a command option, send a request to [hidden email].  Meantime, using MODIFY TABLES or the autoscript approach is the simplest way to do this.  Neither of those would require you to do any programming.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Peck, Jon
Sent: Tuesday, September 08, 2009 12:29 PM
To: [hidden email]
Subject: Re: Simple Correlation Matrix

I don't have that script - I'll take a look if you want to send it, but the
general procedure is just to add a line like
    Set objPivotTable = scriptContext.GetOutputItem()
and removing the parameter list from the Sub statement.
That gives you the equivalent of the objPivotTable you would previously have
gotten through the parameter list.
From there on, the code would be the same.

To use this as an autoscript, you attach it to the particular table type in
Edit>Options>Script and it will be triggered whenever a table of the
specified type is created.

HTH,
Jon

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Bruce Weaver
Sent: Tuesday, September 08, 2009 9:13 AM
To: [hidden email]
Subject: Re: [SPSSX-L] Simple Correlation Matrix

Peck, Jon wrote:

>
> See below.
>
> --- snip ---
> [BW]
> So, I suspect the answer from SPSS will be, "Do it with Python".
>
> [peck]
> No, that is not the answer from SPSS.  Although it would be easy to do
> this task with Python using the SPSSINC MODIFY TABLES extension command,
> you can easily convert an old Basic autoscript.  In most cases that
> amounts to adding one line of code to the script as described in the help
> and saving it as a separate file.  That change was made so that the same
> script could be used either as an autoscript or a regular script.
>
> If someone wants to do this with MODIFY TABLES, though, I can add a tiny
> function to the customstylefunctions module that comes with the command
> that would blank the upper or lower triangle.
>
> Regards,
> Jon Peck
>

Hi Jon.  I take issue with that "easily".  ;-)  I suspect it's easy for
visual basic programmers, but I'm not one of them.  (I was more a Turbo
Pascal guy back in the day.)  I've tried to follow the instructions for
converting the legacy autoscript for correlation matrices to something that
will run in v17, but I'm having a problem at this step:

* Use the scriptContext object (always available) to get the values required
by the autoscript, such as the output item that triggered the autoscript.

An example is given (for Descriptives_Table_DescriptiveStatistics_Create),
but I am unable to work out from it exactly what additions/changes I have to
make to the autoscript that formats correlation matrices.  I think a lot of
users are not visual basic programmers, and so would find it helpful if
converted legacy autoscripts were available for download from the Tech
Support website.  Is this possible?

Thanks,
Bruce


-----
--
Bruce Weaver
[hidden email]
http://sites.google.com/a/lakeheadu.ca/bweaver/
"When all else fails, RTFM."

NOTE:  My Hotmail account is for posting only, and is not monitored
regularly.
If you wish to send me an e-mail, please use the address shown in my sig
file.
--
View this message in context:
http://www.nabble.com/Simple-Correlation-Matrix-tp25224408p25348154.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

=====================
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

=====================
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

=====================
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
12