<?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: t test with surveyfreq in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/573308#M12480</link>
    <description>Are you sure? You have weight statements in both. So I assume when you run without a weight statement you get the same results, which is why you think it's unweighted?&lt;BR /&gt;&lt;BR /&gt;I don't know your data so cannot know if your code is correct, I don't know the topics, variables or what you're trying to test. I would recommend making sure that the example code works on your computer then change your code to align with the example in a manner that makes sense.</description>
    <pubDate>Sat, 13 Jul 2019 18:44:29 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-07-13T18:44:29Z</dc:date>
    <item>
      <title>t test with surveyfreq</title>
      <link>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/572982#M12400</link>
      <description>&lt;P&gt;Hi all, thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been searching for a while and haven't been able to be successful to find a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking at a bunch of survey data, and running the chi-square tests for categorical variables have been straightfoward with the following code that I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;SURVEYFREQ&lt;/STRONG&gt;&amp;nbsp;DATA=xxx;&lt;/P&gt;&lt;P&gt;cluster yyy;&lt;/P&gt;&lt;P&gt;strata zzz;&lt;/P&gt;&lt;P&gt;weight aaa;&lt;/P&gt;&lt;P&gt;VAR Kidney*Gender/row chisq;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trouble coming up with the code to run the t-tests similarly for continuous variables however. Could someone give me an example? The proc t-test doesn't seem appropriate for the large weighted survey data - is there a similar way to do this with surveymeans?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jul 2019 01:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/572982#M12400</guid>
      <dc:creator>EddieJackson</dc:creator>
      <dc:date>2019-07-12T01:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: t test with surveyfreq</title>
      <link>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/572985#M12401</link>
      <description>Have you checked out the examples in the documentation? Does this seem relevant:&lt;BR /&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_surveymeans_examples06.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_surveymeans_examples06.htm&amp;amp;locale=en&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In addition, you can likely use PROC SURVEYREG to get the test statistics and it will be the same results.</description>
      <pubDate>Fri, 12 Jul 2019 02:08:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/572985#M12401</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-12T02:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: t test with surveyfreq</title>
      <link>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/573261#M12469</link>
      <description>&lt;P&gt;I looked at he documentation provided, and came up with the following code which spit out a t value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SURVEYMEANS DATA= Analysis.Analysis;&lt;BR /&gt;cluster HOSP_NRD;&lt;BR /&gt;strata NRD_STRATUM;&lt;BR /&gt;weight DISCWT;&lt;BR /&gt;VAR Age;&lt;BR /&gt;DOMAIN CKD/diffmeans;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think this code is correct? Why is it that the output N's are still the unweighted N's rather than weighted N's (my weighted N's should be much higher)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I do a simple proc t-test the results are similar but again, the N's are unweighted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc ttest data=Analysis.Analysis;&lt;BR /&gt;weight DISCWT;&lt;BR /&gt;class CKD;&lt;BR /&gt;var Age;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 13 Jul 2019 03:01:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/573261#M12469</guid>
      <dc:creator>EddieJackson</dc:creator>
      <dc:date>2019-07-13T03:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: t test with surveyfreq</title>
      <link>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/573308#M12480</link>
      <description>Are you sure? You have weight statements in both. So I assume when you run without a weight statement you get the same results, which is why you think it's unweighted?&lt;BR /&gt;&lt;BR /&gt;I don't know your data so cannot know if your code is correct, I don't know the topics, variables or what you're trying to test. I would recommend making sure that the example code works on your computer then change your code to align with the example in a manner that makes sense.</description>
      <pubDate>Sat, 13 Jul 2019 18:44:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/t-test-with-surveyfreq/m-p/573308#M12480</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-13T18:44:29Z</dc:date>
    </item>
  </channel>
</rss>

