|
Hello, I am looking to correlate a small number of variables (say, Variables
A-E) with a much larger number of variables (say, Variables 1-50). Is
there a way for SPSS to either rank these correlations from highest to lowest
point estimates or to suppress all correlations below a chosen value (similar
to what can be done for factor loadings in SPSS Factor Analysis output)? Richard W. Handel, Ph.D. Associate Professor Department of Psychiatry and Behavioral Sciences Eastern Phone (757)-446-7992 |
|
Dear Mr. Handel,
There may be a Python extension to accomplish this but I'm not sure. Anyway, I'd use OMS to create a dataset with the correlations and then edit this dataset. See the syntax below. HTH, Ruben van den Berg Methodologist TNS NIPO P: +31 20 522 5738 *Create fake data. data list free/id. begin data 1 2 3 4 5 6 7 8 9 10 end data. dataset name d1. compute #t=rv.uni(0,.5). do repeat v=var_a var_b var_c var_d var_e. compute v=rv.uni(0,.5)+#t. end repeat. do repeat v=v_1 to v_50. compute v=rv.uni(0,.5)+#t. end repeat. *OMS command to track down the correlation matrix. * OMS. DATASET DECLARE cor. OMS /SELECT TABLES /IF COMMANDS = ["Correlations"] SUBTYPES = ["Correlations"] /DESTINATION FORMAT = SAV NUMBERED = TableNumber_ OUTFILE = cor VIEWER = NO /TAG = "cor". correlations var_a to var_e with v_1 to v_50. omsend tag=['cor']. dataset activate cor. *Throw away n and p values. select if var2 eq 'Pearson Correlation'. exe. delete variables TableNumber_ to Label_ var2. *Rank correlations (not ABSOLUTE correlations!). rank v_1 to v_50. format Rv_1 to Rv_50 (f1.0). *Suppress all correlations not in ranges [-1, -.3] and [.3, 1] (replace with zeros). recode v_1 to v_50 (.3 thr 1=cop)(-1 thr -.3=cop)(els=0). exe. *Reorder variables in correlation dataset. define !reorder() matc fil fil */keep var1 !do !lv=1 !to 50 !con ('v_',!lv,' ','Rv_',!lv,' ') !doend . !enddefine. set mpr on. !reorder. exe. Date: Tue, 27 Apr 2010 12:57:33 -0400 From: [hidden email] Subject: suppressing output (correlations) To: [hidden email] Hello,
I am looking to correlate a small number of variables (say, Variables A-E) with a much larger number of variables (say, Variables 1-50). Is there a way for SPSS to either rank these correlations from highest to lowest point estimates or to suppress all correlations below a chosen value (similar to what can be done for factor loadings in SPSS Factor Analysis output)?
Richard W. Handel, Ph.D. Associate Professor Department of Psychiatry and Behavioral Sciences Eastern Virginia Medical School 825 Fairfax Avenue, Hofheimer Hall Norfolk, VA 23507 Phone (757)-446-7992
Express yourself instantly with MSN Messenger! MSN Messenger |
|
Ok, here is a snippet from the talk I am giving on extension commands in May at the European Directions conference. Suppose you have run CORRELATIONS. Then the following command hides all the insignificant correlations. SPSSINC CENSOR TABLES CRITLABEL="Sig. (2-tailed)" TESTTYPE=">" CRITVALUE=.05 DIRECTION=COLUMN NEIGHBORS=-1 SUBTYPE="'Correlations'" /OPTIONS HIDECRITFIELD SYMBOL=" ". In my talk, I'll show other ways to use extension commands to improve the readability of a correlation matrix. SPSSINC CENSOR TABLES can be downloaded from Developer Central (www.spss.com/devcentral) and requires the Python plugin in and at least V17. This syntax finds rows labeled "Sig. (2-tailed)", tests whether the values are > .05, and if so, blanks the item one column above. It also hides all the significance values (HIDECRITFIELD). I originally developed this command for the purpose of blanking table cells with a small count, but it can be applied to many types of tables. Regards, Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Dear Mr. Handel, There may be a Python extension to accomplish this but I'm not sure. Anyway, I'd use OMS to create a dataset with the correlations and then edit this dataset. See the syntax below. HTH, Ruben van den Berg Methodologist TNS NIPO E: ruben_van_den_berg@... P: +31 20 522 5738 I: www.tns-nipo.com
Date: Tue, 27 Apr 2010 12:57:33 -0400 From: [hidden email] Subject: suppressing output (correlations) To: [hidden email] Hello, I am looking to correlate a small number of variables (say, Variables A-E) with a much larger number of variables (say, Variables 1-50). Is there a way for SPSS to either rank these correlations from highest to lowest point estimates or to suppress all correlations below a chosen value (similar to what can be done for factor loadings in SPSS Factor Analysis output)? Richard W. Handel, Ph.D. Associate Professor Department of Psychiatry and Behavioral Sciences Eastern Virginia Medical School 825 Fairfax Avenue, Hofheimer Hall Norfolk, VA 23507 Phone (757)-446-7992
Express yourself instantly with MSN Messenger! MSN Messenger
|
|
|
See below Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
|
| Free forum by Nabble | Edit this page |
