<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Suppress non-significant correlations? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967036#M48596</link>
    <description>&lt;P&gt;Thanks ... my actual goal is to identify confounder variables in my dataset governing the relationship between Job Satisfaction (Y outcome, Ordinal, Likert 1 - 5) and WorkRespect (X Predictor, Ordinal, Likert 1 - 4). The characteristics of a confounder C are:&lt;/P&gt;&lt;P&gt;1) Y and C are statistically related (p &amp;lt;0.05)&lt;/P&gt;&lt;P&gt;2) X and C are statistically related (p &amp;lt;0.05)&lt;/P&gt;&lt;P&gt;3) C cannot be in the path between&amp;nbsp; X and Y, otherwise it becomes a mediator.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C (my dataset) is mostly ordinal and nominal, but binary and continuous variables exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying identifying variables in my dataset that meet the first two criteria, hence the original goal for this post. Used SPSS, as I said earlier on a smaller set, then ported the files over into excel and did some painful excel math logic, which I wanted to avoid now, on this much larger dataset. BTW, I compared Spearman and Kendall results form the first two criteria and they were within 10% of each each. Both gave the same number of variables that meet criteria #1 and #2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to determine the 3rd criteria is currently mystery to me now, beyond just drawing Directed Acyclic Graphs (DAGs) and using "strategic common sense" as a colleague told me, to determine whether C truly comes before X or simply does not belong. Literature searches so far have not been that helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways, to preventing bloating this thread any further, I wanted to concentrate on SAS code that helps meet first two criteria. Hope this makes sense and my apologies for any confusion on my part.&lt;/P&gt;</description>
    <pubDate>Tue, 20 May 2025 15:37:22 GMT</pubDate>
    <dc:creator>David_M</dc:creator>
    <dc:date>2025-05-20T15:37:22Z</dc:date>
    <item>
      <title>Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966964#M48586</link>
      <description>&lt;P&gt;I am performing&amp;nbsp; simple Pearson, Spearman and Kendall correlations between many variables using PROC CORR.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; I need to suppress non-significant correlations (p &amp;gt; 0.05) in my matrix, leaving only significant correlations (p &amp;lt;0.05).&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I need to show confidence intervals for these correlations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 23:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966964#M48586</guid>
      <dc:creator>David_M</dc:creator>
      <dc:date>2025-05-19T23:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966968#M48587</link>
      <description>&lt;P&gt;Use the FISHER option, save the corresponding table (see &lt;A href="http://support.sas.com/kb/22949" target="_self"&gt;this note&lt;/A&gt;) using a WHERE clause to filter out the nonsignificant p-values, then print it. For example, using the data set from the Getting Started section of the PROC DISTANCE documentation:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data=protein fisher; 
  var _numeric_;
  ods output fisherpearsoncorr=corrs(where=(pvalue&amp;lt;.05));
  run;
proc print noobs; 
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Also, see &lt;A href="http://support.sas.com/kb/70813" target="_self"&gt;this note&lt;/A&gt; for how to present a heat map visualization of a correlation matrix. that makes significant values stand out.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 00:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966968#M48587</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2025-05-20T00:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966972#M48588</link>
      <description>&lt;P&gt;Thank you ... how can I adapt the code to handle all numeric and categorical variables? I have continuous, ordinal, binary and nominal variables I need to perform the aforementioned&amp;nbsp; correlation tests on and generate the two Spearman and Kendall tau-b correlation matrices. My&amp;nbsp; apologies, but I'm very new to SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 05:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966972#M48588</guid>
      <dc:creator>David_M</dc:creator>
      <dc:date>2025-05-20T05:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966985#M48590</link>
      <description>Check &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; blog:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/09/20/fishers-transformation-correlation.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/09/20/fishers-transformation-correlation.html&lt;/A&gt;</description>
      <pubDate>Tue, 20 May 2025 08:20:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966985#M48590</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-05-20T08:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966986#M48591</link>
      <description>If it is continuous ,check Pearson or Spearman.&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/09/20/fishers-transformation-correlation.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/09/20/fishers-transformation-correlation.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;if it is ordinal,using  polychoric correlation.&lt;BR /&gt;check &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt; blog:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2023/12/11/polychoric-correlation.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2023/12/11/polychoric-correlation.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;if it is binary or nomial ,check Cosine coefficient:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/09/05/cosine-similarity-recommendations.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/09/05/cosine-similarity-recommendations.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2019/09/03/cosine-similarity.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2019/09/03/cosine-similarity.html&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 May 2025 08:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966986#M48591</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-05-20T08:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966995#M48592</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;I am performing&amp;nbsp; simple Pearson, Spearman and Kendall correlations between many variables using PROC CORR.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;How many variables do you have? For N variables, there are N*(N-1)/2 pairwise correlations, most of which will be significant. For example, if you have N=100 variables, it is likely you will encounter as many as ~5000 significant correlations. On the other hand, if you have N=10 or N=15, then you can visualize the correlations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, how many variables and what do you want to do with the information about correlations?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 10:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/966995#M48592</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2025-05-20T10:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967010#M48593</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;. You guessed it.&amp;nbsp; I have a total of 100 variables (of all types) that most will not be significant, hence the need to sort them out by their p-values. I do not want to have a 100x100 matrix table that I would then manually sort out the statistically significant variables in Excel. Did it before on a 50x50 matrix from another dataset generated in SPSS (of which &amp;lt; 50 were significant), though I had hoped SAS would be more streamlined about this.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 13:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967010#M48593</guid>
      <dc:creator>David_M</dc:creator>
      <dc:date>2025-05-20T13:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967016#M48594</link>
      <description>&lt;P&gt;Does this help?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Filtering-Correlation-Matrix/m-p/645388#M30980" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Statistical-Procedures/Filtering-Correlation-Matrix/m-p/645388#M30980&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 13:56:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967016#M48594</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-05-20T13:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967030#M48595</link>
      <description>&lt;P&gt;I think the task you propose is hard and it's not clear what information it would provide. Again, what do you intend to do with these thousands of numbers? What is the scientific result you want to find? The reason I ask is that there might be a better way to conduct your analysis.&amp;nbsp; For example, if your goal is to reduce the number of variables in a model by eliminating highly correlated variables, there are better ways to implement that task.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another question: You say, "&lt;SPAN&gt;I have continuous, ordinal, binary and nominal variables."&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;The statistic you need to use depends on the type of the variable. Is there some naming convention that enables you to determine the type of the variable? For example, are the variables named CONT1-CONT20, ORD1-ORD25, and NOM1-NOM10?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, you would use a different measure of association for the various combination of variables:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Cont-Cont&amp;nbsp;: usually Pearson correlation&lt;/LI&gt;
&lt;LI&gt;Cont-Ord : Recode Ord as 1,2,..,k and use Kendall tau-b&lt;/LI&gt;
&lt;LI&gt;Cont-Nom : This is tough, You have to recode the levels and use something called the point-biserial correlation. I've never done this.&lt;/LI&gt;
&lt;LI&gt;Ord-Ord : Kendall tau-b&lt;/LI&gt;
&lt;LI&gt;Ord-Nom : rank-biserial correlation. I've never done this.&lt;/LI&gt;
&lt;LI&gt;Nom-Nom : PROC FREQ provides several statistics of ASSOCIATION&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I do not think many people try to compute these statistics all at once because you cannot easily compare one method to another. For example, a Kendall tau-b score of 0.5 does not equate to a Pearson correlation of 0.5. I would not know how to compare the various statistics to each other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 14:20:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967030#M48595</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2025-05-20T14:20:23Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967036#M48596</link>
      <description>&lt;P&gt;Thanks ... my actual goal is to identify confounder variables in my dataset governing the relationship between Job Satisfaction (Y outcome, Ordinal, Likert 1 - 5) and WorkRespect (X Predictor, Ordinal, Likert 1 - 4). The characteristics of a confounder C are:&lt;/P&gt;&lt;P&gt;1) Y and C are statistically related (p &amp;lt;0.05)&lt;/P&gt;&lt;P&gt;2) X and C are statistically related (p &amp;lt;0.05)&lt;/P&gt;&lt;P&gt;3) C cannot be in the path between&amp;nbsp; X and Y, otherwise it becomes a mediator.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;C (my dataset) is mostly ordinal and nominal, but binary and continuous variables exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying identifying variables in my dataset that meet the first two criteria, hence the original goal for this post. Used SPSS, as I said earlier on a smaller set, then ported the files over into excel and did some painful excel math logic, which I wanted to avoid now, on this much larger dataset. BTW, I compared Spearman and Kendall results form the first two criteria and they were within 10% of each each. Both gave the same number of variables that meet criteria #1 and #2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to determine the 3rd criteria is currently mystery to me now, beyond just drawing Directed Acyclic Graphs (DAGs) and using "strategic common sense" as a colleague told me, to determine whether C truly comes before X or simply does not belong. Literature searches so far have not been that helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways, to preventing bloating this thread any further, I wanted to concentrate on SAS code that helps meet first two criteria. Hope this makes sense and my apologies for any confusion on my part.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 15:37:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967036#M48596</guid>
      <dc:creator>David_M</dc:creator>
      <dc:date>2025-05-20T15:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967041#M48597</link>
      <description>&lt;P&gt;It is not "bloating this thread" to explain the background behind your problem. In most cases, it is a necessary ingredient that ought to be in the very first post on the topic. And in this case,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;has been asking for this background information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In fact, when people focus entirely on the code problem they have and do not provide background, I think this is usually a poor way to get help. When we know the background and the code problem you are having, we can often provide alternative ways to get there rather than the approach the user is taking in writing code; often the alternatives are simpler to code and will run faster.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 16:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967041#M48597</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2025-05-20T16:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967043#M48598</link>
      <description>&lt;P&gt;My sincerest apologies ... I realize it can be very frustrating to the community I'm trying to ask for help.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 17:25:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967043#M48598</guid>
      <dc:creator>David_M</dc:creator>
      <dc:date>2025-05-20T17:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967058#M48599</link>
      <description>You might want to take a look at PROC CAUSALGRAPH which can help to create an adjustment set of variables that can allow you to estimate the direct effect from X to Y. CAUSALGRAPH takes a DAG as input. Also look over the CAUSALTRT, CAUSALMED, or PSMATCH procedures to deal with confounding or mediating variables.</description>
      <pubDate>Tue, 20 May 2025 21:23:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967058#M48599</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2025-05-20T21:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967073#M48600</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp; did wrote a blog for this topic. Check this:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/08/16/pairwise-correlations-bar-chart.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/08/16/pairwise-correlations-bar-chart.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="tinyMceEditorKsharp_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1747789853505.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107185i88C14D3CFEA6C948/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1747789853505.png" alt="Ksharp_1-1747789853505.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you could find all the correlation coefficient measure at his blog:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/09/05/7-ways-view-correlation.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2017/09/05/7-ways-view-correlation.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 01:12:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967073#M48600</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-05-21T01:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967407#M48606</link>
      <description>&lt;P&gt;Ok, with your help, I came up with the following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods select JS_Corr;&lt;BR /&gt; &lt;BR /&gt;/* Perform Spearman’s correlation for Job_Satisfaction and Respect at Work with potential confounders */
proc corr data=F0_Data fisher spearman;
	var Job_Satis Resp_Work;
	with _all_;
	ods output fisherspearmancorr = JS_Corr(where=(pvalue&amp;lt;.05)); /* Save the correlation table parameters with p&amp;lt;0.05 to JS_Corr */
run;
ods pdf file="JobSatis_Resp@Work Confounders.pdf"; 
Title "Job Satisfaction - Respect at Work Potential Confounders";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Need to get rid of the X variables" style="width: 772px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107324i84A04DBBA72BFAEB/image-size/large?v=v2&amp;amp;px=999" role="button" title="JS_RW_Table.jpg" alt="Need to get rid of the X variables" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Need to get rid of the X variables&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It seems to produce the desired output of finding variables that pair with both Job_Satis and Resp_Work an have a p &amp;lt;0.05, which is the desired outcome, except for these two issues:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#3366FF"&gt;1. How do I get rid of the variables coded as &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;X&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#3366FF"&gt;&lt;FONT color="#FF0000"&gt;&amp;nbsp;&lt;/FONT&gt;? They do not the desired requirement as those shown in the green boxes?&lt;/FONT&gt;&amp;nbsp;A variable in the WithVar column has to be statistically significant with both Job_Satis (outcome) and Resp_Work (predictor), hence a confounding variable. Otherwise do not include in display table or JS_Corr array or anywhere.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt;2. &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#3366FF"&gt;How can I save the correct possible confounding variables (ordinals and nominals) in the green box to another array as distinct and not duplicated variables?&lt;/FONT&gt;&lt;FONT color="#FF0000"&gt;&lt;FONT color="#000000"&gt; I will be performing some analysis to reduce collinearity amongst these variables for a later ordinal logistic regression modelling. Either PCA (?) VIF (Polychoric ?) procedures are the candidates for now.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seriously, thank you!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 May 2025 18:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967407#M48606</guid>
      <dc:creator>David_M</dc:creator>
      <dc:date>2025-05-24T18:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967410#M48607</link>
      <description>&lt;P&gt;1)For your first question:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data=sashelp.heart(obs=400)  fisher(biasadj=no) spearman;
	var weight height;
	with _numeric_;
	ods output fisherspearmancorr = JS_Corr; 
run;

proc sql;
create table want as
select *
 from JS_Corr
  group by WithVar 
   having sum(.&amp;lt;pvalue&amp;lt;.05)=2;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;P.S. if your data is very big ,you would end up with all obs have p-value&amp;lt;0.05 .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)For your second question, you could create a macro variabe to include all these variable name. and use it in the next proc logistic code:&lt;/P&gt;
&lt;PRE&gt;proc sql noprint;
select distinct WithVar into :vnames separated by ' ' from want ;
quit;

%put &amp;amp;=vnames. ;


proc logistic .........;
model y= &amp;amp;vnames. ;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S. To know the&amp;nbsp;&lt;SPAN&gt;collinearity&amp;nbsp;between variables, I would like to use option CORRB if you are performing LOGISTIC Model:&lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;proc logistic data=sashelp.heart;
model sex(event='Male')=_numeric_/corrb;
run;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1748138520575.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/107325iD6956A987E54E82D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1748138520575.png" alt="Ksharp_0-1748138520575.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 May 2025 02:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967410#M48607</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-05-25T02:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967418#M48609</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp; ... I believe I understand your first solution, but not the second one. Would you mind explaining its logic? Thanks again.&lt;/P&gt;</description>
      <pubDate>Sun, 25 May 2025 11:40:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967418#M48609</guid>
      <dc:creator>David_M</dc:creator>
      <dc:date>2025-05-25T11:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967429#M48610</link>
      <description>&lt;P&gt;I think the easiest way to do this is to create separate data sets of the significant correlations for each of your two primary variables and then merge them together, keeping the correlations that are on the same WITH variable.&amp;nbsp; However, you are at risk of the common problem of multiple testing and its effect on your overall error rate. Because you are testing many correlations, presumably each at 0.05 level, the error rate over all of these tests is much higher than 0.05. This can be handled by using a p-value adjustment method. You can use PROC MULTTEST to do this. There are many adjustment methods available, but one that is generally acceptable is Holm's stepdown Bonferroni method which is much less conservative than the simple well-known Bonferroni method. The entire process is illustrated in the example below using the wine cultivar data that can be found in the PROC HPSPLIT documentation in the SAS/STAT User's Guide - see the Getting Started example. In the code below, Alcohol and Malic are treated like your two primary variables. Correlations with adjusted p-values less than 0.05 are kept.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc corr data=wine fisher spearman;
var alcohol malic;
with _numeric_;
ods output fisherspearmancorr = corr;
run;
proc multtest inpvalues(pvalue)=corr holm;
ods output pvalues=adjp;
run;
data alc(where=(var='Alcohol' and stepdownbonferroni&amp;lt;.05)) 
     mal(where=(var='Malic' and stepdownbonferroni&amp;lt;.05));
merge corr adjp;
run;
proc sort data=alc; by withvar; run;
proc sort data=mal; by withvar; run;
data done;
merge alc(rename=(var=var1 corr=corralc raw=pvalalc stepdownbonferroni=adjpalc))
      mal(rename=(var=var2 corr=corrmal raw=pvalmal stepdownbonferroni=adjpmal));
by withvar;
drop zval--ucl;
if var1 ne ' ' and var2 ne ' ' then output;
run;
proc print;
id withvar;
var var: corr: adj:;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 25 May 2025 14:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967429#M48610</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2025-05-25T14:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967433#M48611</link>
      <description>&lt;P&gt;Thank you for this...I'll try to adapt it to my code. Actually, I tried a similar methods first, but then got stuck after the merging about how to extract the data I needed and I gave up on it after 2 days of frustration. Thanks...will give update soon.&lt;/P&gt;</description>
      <pubDate>Sun, 25 May 2025 19:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967433#M48611</guid>
      <dc:creator>David_M</dc:creator>
      <dc:date>2025-05-25T19:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Suppress non-significant correlations?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967446#M48613</link>
      <description>&lt;P&gt;My suggestion for second one is using CORRB option,and remove thoese variable have collinearity, not listing these variables in PROC LOGISTIC.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc logistic data=sashelp.heart;
model sex(event='Male')=_numeric_/&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;corrb&lt;/STRONG&gt;&lt;/FONT&gt;;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 May 2025 01:08:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Suppress-non-significant-correlations/m-p/967446#M48613</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-05-26T01:08:21Z</dc:date>
    </item>
  </channel>
</rss>

