<?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 there are differences in the P values of SAS and SPSS  when it is a multiple categorical variable? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868547#M42941</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;We conducted a multivariate logistic regression analysis on the same dataset using both SAS and SPSS software. We found that the odds ratio of all variables was consistent between the two software.&lt;/P&gt;
&lt;P&gt;However, when the variable is a multiple categorical variable, there are differences in the P values of SAS and SPSS analyses. Notably, the P values of continuous variables and binary variables are consistent between SAS and SPSS software.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are very confused about this situation. Your help would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2023 03:27:38 GMT</pubDate>
    <dc:creator>Dennisky</dc:creator>
    <dc:date>2023-04-07T03:27:38Z</dc:date>
    <item>
      <title>there are differences in the P values of SAS and SPSS  when it is a multiple categorical variable?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868547#M42941</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;We conducted a multivariate logistic regression analysis on the same dataset using both SAS and SPSS software. We found that the odds ratio of all variables was consistent between the two software.&lt;/P&gt;
&lt;P&gt;However, when the variable is a multiple categorical variable, there are differences in the P values of SAS and SPSS analyses. Notably, the P values of continuous variables and binary variables are consistent between SAS and SPSS software.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are very confused about this situation. Your help would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 03:27:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868547#M42941</guid>
      <dc:creator>Dennisky</dc:creator>
      <dc:date>2023-04-07T03:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868577#M42942</link>
      <description>&lt;P&gt;Please show us your SAS code and explain which p-value you are looking at.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, a p-value is dependent on the distribution of a statistic under a null hypothesis. Sometimes p-values are approximate because the true sampling distribution of a statistic is unknown or is known only asymptotically for large samples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Different software will obtain the same value only if the null hypothesis and the distributional assumptions are the same for both software. Clearly, that is not the case for this problem. But if you show the code, we can explain what H0, statistic, and distributional assumptions SAS is using.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 10:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868577#M42942</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-04-07T10:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868599#M42945</link>
      <description>&lt;P&gt;This is likely due to a difference in the parameterization (coding) of the design ("dummy") variables that represent a categorical variable when fitting the model. If you are using PROC LOGISTIC, and the variables that show the difference are specified in the CLASS statement, and if you did not specify the PARAM= option in the CLASS statement, then PROC LOGISTIC uses effects coding to create the design variables. If the other software uses the typical 0,1 coding for the design variables that it creates, then you should specify the PARAM=GLM option in the CLASS statement in order to have PROC LOGISTIC use the same coding. For example:&amp;nbsp; class x1 x2 / param=glm;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 13:51:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868599#M42945</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-04-07T13:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868615#M42946</link>
      <description>&lt;P&gt;The question I would ask is how often an observed difference has a practical impact on analysis.&lt;/P&gt;
&lt;P&gt;Even running the same version of the same release of software on different computers can result in different results due to differences in versions of math co-processors (when they were different chips) or just the main processor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Between different software the algorithms chosen to implement a specific calculation can result in different results because of limits of precision in internal storage. Plus you have the whole "decimal values often cannot be stored exactly with binary" issue. So you get some amount of rounding differences that can accumulate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I had a reason to compare SUDAAN, another software used for statistics in complex weighting of data, with SAS. I could detect differences in the confidence limits between SUDAAN and SAS output but the differences usually were detectable at the 0.001 position in percentages. In the data that I was using that meant at most the limits when projected onto the population of interest might vary by almost 0.3 persons (yes threee-tenths of a person) which we deemed as not a practical impact on the decisions that would be made using the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or consider something like house pricing that typically runs with values recently well over $100,000. Would a difference in analysis of pricing that varied by $0.57 (57 cents) make much difference in a practical sense on the analysis?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 15:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868615#M42946</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-07T15:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868634#M42948</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/373053"&gt;@Dennisky&lt;/a&gt;, how different are your p-values for SAS and SPSS? Could you please give an example?</description>
      <pubDate>Fri, 07 Apr 2023 16:57:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868634#M42948</guid>
      <dc:creator>pink_poodle</dc:creator>
      <dc:date>2023-04-07T16:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868683#M42958</link>
      <description>&lt;P&gt;Thank you so much!&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you very much for the attention and guidance of every expert.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;For example, &lt;STRONG&gt;&lt;EM&gt;xgra&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;is a three-category variable, divided into categories 1, 2, and 3. And &lt;STRONG&gt;&lt;EM&gt;xindl&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;is a binary variable, divided into categories 0 and 1.&lt;/P&gt;
&lt;P&gt;They are the two variables in our logistic analysis.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Y&lt;/STRONG&gt;&lt;/EM&gt; is a dependent variable divided into two categories, 0 and 1.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This our SAS code for the example data :&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;* proc logistic descending data=s1;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;class xgra(ref="1") xindl(ref="0"); &lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;model y=xgra xindl;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;run; *&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And we upload figure1-2 for the result of SAS (figure1) and SPSS(figure2), respectively.&lt;/P&gt;
&lt;P&gt;The content in the red box represents the p-value results of the multi-class variable&lt;STRONG&gt;&amp;nbsp;&lt;EM&gt;xgra &lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;Although the results of the odds ratio are the same for both software, we can observe that the p-value results from the two software are not the same, even opposite (one is significant while the other is not significant).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="figure1.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82423i1F1F87CB131A35D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="figure1.png" alt="figure1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="figure2.jpeg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82422iB38B8F03BF191EFF/image-size/large?v=v2&amp;amp;px=999" role="button" title="figure2.jpeg" alt="figure2.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 09:04:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868683#M42958</guid>
      <dc:creator>Dennisky</dc:creator>
      <dc:date>2023-04-08T09:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868689#M42959</link>
      <description>&lt;P&gt;Thank you for uploading the images and posting the PROC LOGISTIC statements. Your output shows that the parameter estimates from SAS and SPSS are different. Therefore, you should not be wondering why the p-values are different but why the &lt;EM&gt;coefficient estimates&lt;/EM&gt; are different.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As StatDave says, the most likely difference is &lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_logistic_syntax05.htm" target="_self"&gt;the coding (parameterization) for the categorical independent variables&lt;/A&gt;. PROC LOGISTIC uses effect coding by default. From the SPSS output, it looks like they are using "dummy encoding," which SAS calls GLM encoding.&lt;/P&gt;
&lt;P&gt;Try modifying your CLASS statement to be&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;class xgra(ref="1") xindl(ref="0") / param=GLM&lt;/EM&gt;&lt;EM&gt;;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;and let us know whether that provides parameter estimates that match your SPSS output.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 09:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868689#M42959</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-04-08T09:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868691#M42960</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;We attempted to modify our CLASS statement as you and StatDave had mentioned.&lt;/P&gt;
&lt;P&gt;We have successfully resolved the issue. It was done perfectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Notably, we still have a question.&lt;/P&gt;
&lt;P&gt;Why does the SAS output show that the OR value of variable&lt;EM&gt;&lt;STRONG&gt; xgra&amp;nbsp; (xgra 2 vs1 OR：2.684（1.845-3.904）&lt;/STRONG&gt;&lt;/EM&gt;&amp;nbsp;is significant, but the p-value&lt;EM&gt;&lt;STRONG&gt;（p=0.2675）&lt;/STRONG&gt;&lt;/EM&gt; is not?&amp;nbsp; The SAS result shows the opposite conclusion for it.(see figure1)&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 10:24:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868691#M42960</guid>
      <dc:creator>Dennisky</dc:creator>
      <dc:date>2023-04-08T10:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868692#M42961</link>
      <description>&lt;P&gt;The p-values are for different null hypotheses.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Parameter Estimates table, the p-value is for the null hypothesis beta=0. For example, in the image you posted, the estimate for the coefficient of (xgra=2) in the model is -0.2, which is not significantly different from 0 because the standard error is approximately 0.2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Odds Ratio table, the null hypothesis is ratio=1. For example, in the image you posted, the estimate for the ratio of (xgra 2 vs 1) is 2.7 and a 95% CI is [1.8, 3.9]. Because this interval does not include 1, we infer that the related ratio parameter is significantly different from 1.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 10:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868692#M42961</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2023-04-08T10:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868695#M42962</link>
      <description>&lt;P&gt;Thank you for your suggestions, which perfectly solved my problem. Each of your answers sparkles with the light of wisdom and brings me a lot of inspiration.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 12:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868695#M42962</guid>
      <dc:creator>Dennisky</dc:creator>
      <dc:date>2023-04-08T12:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868698#M42964</link>
      <description>&lt;P&gt;The hypotheses differ, as Rick says, but specifically because of the coding difference that I mentioned before. Without the PARAM=GLM option, the effects coding that is used causes the parameter to estimate the difference between the XGRA=2 level and the average of all the XGRA levels. It does NOT compare XGRA=2 to the XGRA=1, which is what the odds ratio estimate does. Hence the hypothesis difference and also the fact that the parameter estimates differ. If you use the PARAM=GLM option, the parameter estimates the 2 vs 1 difference and should then agree with the conclusion based on the odds ratio. All this is described in &lt;A href="http://support.sas.com/kb/36478" target="_self"&gt;this note&lt;/A&gt;&amp;nbsp;and you should probably also read &lt;A href="http://support.sas.com/kb/23087" target="_self"&gt;this related note&lt;/A&gt; that explains how the coding difference also causes the odds ratio to not equal the exponentiated parameter estimate.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Apr 2023 14:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868698#M42964</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2023-04-08T14:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: there are differences in the P values of SAS and SPSS  when it is a multiple categorical variabl</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868968#M43005</link>
      <description>Thank you for your suggestion, which enables us to have a deeper understanding of this principle.</description>
      <pubDate>Tue, 11 Apr 2023 03:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/there-are-differences-in-the-P-values-of-SAS-and-SPSS-when-it-is/m-p/868968#M43005</guid>
      <dc:creator>Dennisky</dc:creator>
      <dc:date>2023-04-11T03:01:09Z</dc:date>
    </item>
  </channel>
</rss>

