<?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: Comparing means from two independent samples in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735014#M35668</link>
    <description>&lt;P&gt;Assuming your data came from a probability survey design, your objectives is to compute finite population stats and make inferences about finite population and you know the two cities population total. then you can try the following code for a scarified random sample design:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveymeans data=&amp;amp;dataset N=(city1total city2total) nomcar nobs mean stderr var cv clm min max median plots=none;
var coffee_spent ;
domain cities*gender;
domain cities('city1')*gender;
domain cities*gender/diff bon;
strata cities;
weight &amp;amp;weight_var;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Providing city1 and city2 totals will apply the finite population adjustment.&lt;/P&gt;</description>
    <pubDate>Sun, 18 Apr 2021 04:01:21 GMT</pubDate>
    <dc:creator>gcjfernandez</dc:creator>
    <dc:date>2021-04-18T04:01:21Z</dc:date>
    <item>
      <title>Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734817#M35649</link>
      <description>&lt;P&gt;I have two independent samples from two cities. I want to compare the average money they spend on coffees each month. I am using PROC SURVEYMEANS but I am not sure if I am using the right statement to identify cities.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this document:&amp;nbsp;&lt;A href="http://www.math.wpi.edu/saspdf/stat/chap61.pdf" target="_blank" rel="noopener nofollow noreferrer"&gt;http://www.math.wpi.edu/saspdf/stat/chap61.pdf&lt;/A&gt;&amp;nbsp; &amp;nbsp;It says to use&amp;nbsp;&lt;STRONG&gt;stratum&amp;nbsp;&lt;/STRONG&gt;to compare two independent samples but I tried it and it did not give me a reasonable result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My results from using DOMAIN and DIFF look fine when I compare the p-value for the t-statistic and the CI for each mean. However, my concern is if I was comparing the average money spent on coffee for men and women in one sample (instead of two independent samples that I have in my study) I still would use the same DOMAIN and DIFF statements. Does that make sense?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class="language-sas"&gt;&lt;CODE&gt;proc surveymeans data=&amp;amp;dataset  nobs mean stderr var cv clm min max median plots=none;
var coffee_spent ;
domain cities/diff;
weight &amp;amp;weight_var;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV class="c proctitle"&gt;The SURVEYMEANS Procedure&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Surveymeans: Statistics for WAVE Domains" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="11" scope="colgroup" width="643.2px"&gt;Statistics for WAVE Domains&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r b header" scope="col" width="36.8px"&gt;cities&lt;/TH&gt;
&lt;TH class="l b header" scope="col" width="83.2px"&gt;Variable&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="46.4px"&gt;N&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="56.8px"&gt;Minimum&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="62.4px"&gt;Maximum&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="52.8px"&gt;Mean&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="57.6px"&gt;Std Error&lt;BR /&gt;of Mean&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="78.4px"&gt;Var of&lt;BR /&gt;Mean&lt;/TH&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup" width="108.8px"&gt;95% CL for Mean&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="60px"&gt;Coeff of&lt;BR /&gt;Variation&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r t rowheader" scope="row" width="36.8px"&gt;2&lt;/TH&gt;
&lt;TH class="l rowheader" scope="row" width="83.2px"&gt;coffee_spent&lt;/TH&gt;
&lt;TD width="46.4px" class="r data"&gt;1368&lt;/TD&gt;
&lt;TD width="56.8px" class="r data"&gt;1.4&lt;/TD&gt;
&lt;TD width="62.4px" class="r data"&gt;50.0&lt;/TD&gt;
&lt;TD width="52.8px" class="r data"&gt;12.42&lt;/TD&gt;
&lt;TD width="57.6px" class="r data"&gt;0.3&lt;/TD&gt;
&lt;TD width="78.4px" class="r data"&gt;0.091658&lt;/TD&gt;
&lt;TD width="54.4px" class="r data"&gt;11.83&lt;/TD&gt;
&lt;TD width="54.4px" class="r data"&gt;13.01&lt;/TD&gt;
&lt;TD width="60px" class="r data"&gt;0.024&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r t rowheader" scope="row" width="36.8px"&gt;3&lt;/TH&gt;
&lt;TH class="l rowheader" scope="row" width="83.2px"&gt;coffee_spent&lt;/TH&gt;
&lt;TD width="46.4px" class="r data"&gt;1243&lt;/TD&gt;
&lt;TD width="56.8px" class="r data"&gt;1.7&lt;/TD&gt;
&lt;TD width="62.4px" class="r data"&gt;57.5&lt;/TD&gt;
&lt;TD width="52.8px" class="r data"&gt;13.42&lt;/TD&gt;
&lt;TD width="57.6px" class="r data"&gt;0.4&lt;/TD&gt;
&lt;TD width="78.4px" class="r data"&gt;0.124780&lt;/TD&gt;
&lt;TD width="54.4px" class="r data"&gt;12.72&lt;/TD&gt;
&lt;TD width="54.4px" class="r data"&gt;14.11&lt;/TD&gt;
&lt;TD width="60px" class="r data"&gt;0.026&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A target="_blank" name="IDX4"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Surveymeans: Differences of HERB_US_PP Means for WAVE Domains" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="7" scope="colgroup" width="397.6px"&gt;Differences of HERB_US_PP Means for WAVE Domains&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r b header" scope="col" width="36.8px"&gt;cities&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="41.6px"&gt;-cities&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="84px"&gt;Diff&lt;BR /&gt;Estimate&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="78.4px"&gt;Std&lt;BR /&gt;Error&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="46.4px"&gt;DF&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="48px"&gt;t&amp;nbsp;Value&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="62.4px"&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;|t|&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r t rowheader" scope="row" width="36.8px"&gt;2&lt;/TH&gt;
&lt;TH class="r t rowheader" scope="row" width="41.6px"&gt;3&lt;/TH&gt;
&lt;TD width="84px" class="r data"&gt;-0.996823&lt;/TD&gt;
&lt;TD width="78.4px" class="r data"&gt;0.465238&lt;/TD&gt;
&lt;TD width="46.4px" class="r data"&gt;2610&lt;/TD&gt;
&lt;TD width="48px" class="r data"&gt;-2.14&lt;/TD&gt;
&lt;TD width="62.4px" class="r data"&gt;0.0322&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Apr 2021 21:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734817#M35649</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-16T21:12:34Z</dc:date>
    </item>
    <item>
      <title>proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734795#M35658</link>
      <description>&lt;P&gt;I have two independent samples from two cities. I want to compare the average money they spend on coffees each month. I am using PROC SURVEYMEANS but I am not sure if I am using the right statement to identify cities.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this document:&amp;nbsp;&lt;A href="http://www.math.wpi.edu/saspdf/stat/chap61.pdf" target="_blank" rel="noopener"&gt;http://www.math.wpi.edu/saspdf/stat/chap61.pdf&lt;/A&gt;&amp;nbsp; &amp;nbsp;It says to use&amp;nbsp;&lt;STRONG&gt;stratum&amp;nbsp;&lt;/STRONG&gt;to compare two independent samples but I tried it and it did not give me a reasonable result. Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveymeans data=&amp;amp;dataset  nobs mean stderr var cv clm min max median plots=none;
var coffee_spent ;
domain cities/diff;
weight &amp;amp;weight_var;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="branch"&gt;
&lt;DIV class="c proctitle"&gt;The SURVEYMEANS Procedure&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Surveymeans: Statistics for WAVE Domains" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt; &lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="11" scope="colgroup" width="643.2px"&gt;Statistics for WAVE Domains&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r b header" scope="col" width="36.8px"&gt;cities&lt;/TH&gt;
&lt;TH class="l b header" scope="col" width="83.2px"&gt;Variable&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="46.4px"&gt;N&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="56.8px"&gt;Minimum&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="62.4px"&gt;Maximum&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="52.8px"&gt;Mean&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="57.6px"&gt;Std Error&lt;BR /&gt;of Mean&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="78.4px"&gt;Var of&lt;BR /&gt;Mean&lt;/TH&gt;
&lt;TH class="c b header" colspan="2" scope="colgroup" width="108.8px"&gt;95% CL for Mean&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="60px"&gt;Coeff of&lt;BR /&gt;Variation&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r t rowheader" scope="row" width="36.8px"&gt;2&lt;/TH&gt;
&lt;TH class="l rowheader" scope="row" width="83.2px"&gt;coffee_spent&lt;/TH&gt;
&lt;TD width="46.4px" class="r data"&gt;1368&lt;/TD&gt;
&lt;TD width="56.8px" class="r data"&gt;1.4&lt;/TD&gt;
&lt;TD width="62.4px" class="r data"&gt;50.0&lt;/TD&gt;
&lt;TD width="52.8px" class="r data"&gt;12.42&lt;/TD&gt;
&lt;TD width="57.6px" class="r data"&gt;0.3&lt;/TD&gt;
&lt;TD width="78.4px" class="r data"&gt;0.091658&lt;/TD&gt;
&lt;TD width="54.4px" class="r data"&gt;11.83&lt;/TD&gt;
&lt;TD width="54.4px" class="r data"&gt;13.01&lt;/TD&gt;
&lt;TD width="60px" class="r data"&gt;0.024&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r t rowheader" scope="row" width="36.8px"&gt;3&lt;/TH&gt;
&lt;TH class="l rowheader" scope="row" width="83.2px"&gt;coffee_spent&lt;/TH&gt;
&lt;TD width="46.4px" class="r data"&gt;1243&lt;/TD&gt;
&lt;TD width="56.8px" class="r data"&gt;1.7&lt;/TD&gt;
&lt;TD width="62.4px" class="r data"&gt;57.5&lt;/TD&gt;
&lt;TD width="52.8px" class="r data"&gt;13.42&lt;/TD&gt;
&lt;TD width="57.6px" class="r data"&gt;0.4&lt;/TD&gt;
&lt;TD width="78.4px" class="r data"&gt;0.124780&lt;/TD&gt;
&lt;TD width="54.4px" class="r data"&gt;12.72&lt;/TD&gt;
&lt;TD width="54.4px" class="r data"&gt;14.11&lt;/TD&gt;
&lt;TD width="60px" class="r data"&gt;0.026&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;A target="_blank" name="IDX4"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Surveymeans: Differences of HERB_US_PP Means for WAVE Domains" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;&lt;COLGROUP&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt; &lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c b header" colspan="7" scope="colgroup" width="397.6px"&gt;Differences of HERB_US_PP Means for WAVE Domains&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="r b header" scope="col" width="36.8px"&gt;cities&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="41.6px"&gt;-cities&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="84px"&gt;Diff&lt;BR /&gt;Estimate&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="78.4px"&gt;Std&lt;BR /&gt;Error&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="46.4px"&gt;DF&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="48px"&gt;t&amp;nbsp;Value&lt;/TH&gt;
&lt;TH class="r b header" scope="col" width="62.4px"&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;|t|&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="r t rowheader" scope="row" width="36.8px"&gt;2&lt;/TH&gt;
&lt;TH class="r t rowheader" scope="row" width="41.6px"&gt;3&lt;/TH&gt;
&lt;TD width="84px" class="r data"&gt;-0.996823&lt;/TD&gt;
&lt;TD width="78.4px" class="r data"&gt;0.465238&lt;/TD&gt;
&lt;TD width="46.4px" class="r data"&gt;2610&lt;/TD&gt;
&lt;TD width="48px" class="r data"&gt;-2.14&lt;/TD&gt;
&lt;TD width="62.4px" class="r data"&gt;0.0322&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 16 Apr 2021 20:11:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734795#M35658</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-16T20:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734801#M35659</link>
      <description>&lt;P&gt;This should help:&lt;/P&gt;
&lt;P&gt;Usage Note 34607: How can I compare means in PROC SURVEYMEANS?&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/kb/34/607.html" target="_blank"&gt;https://support.sas.com/kb/34/607.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know a lot about comparing (group-)means but have never used PROC SURVEYMEANS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But of course, you can post your follow-up questions, if any; I will try to answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 20:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734801#M35659</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-04-16T20:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734803#M35660</link>
      <description>&lt;P&gt;Or just look in the documentation:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SAS/STAT® 15.2 User's Guide&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The SURVEYMEANS Procedure&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Example 120.6 Comparing Domain Means&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://go.documentation.sas.com/doc/en/statug/15.2/statug_surveymeans_examples06.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/statug/15.2/statug_surveymeans_examples06.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Have a nice weekend,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Koen&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 20:50:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734803#M35660</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-04-16T20:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734804#M35661</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;A class="trigger-hovercard" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/60547" target="_blank"&gt;sbxkoenk&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;This page that you shared is the equivalent of the DOMAIN and DIFF that I used in SAS 9.4. "&lt;SPAN&gt;in SAS 9.4 TS1M4, you can use the DIFF option in the DOMAIN statement to compare the means of continuous variables"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;My results from using DOMAIN and DIFF look fine when I compare the p-value for the t-statistic and the CI for each mean. However, my concern is if I was comparing the average money spent on coffee for men and women in one sample (instead of two independent samples that I have in my study) I still would use the same DOMAIN and DIFF statements. Does that make sense?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 20:50:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734804#M35661</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-16T20:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734806#M35662</link>
      <description>Thank you, Koen, for your suggestions. You also have a nice weekend!</description>
      <pubDate>Fri, 16 Apr 2021 20:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734806#M35662</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-16T20:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734810#M35663</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I understand your concern.&lt;/P&gt;
&lt;P&gt;Will have a look at it tomorrow.&lt;/P&gt;
&lt;P&gt;Will now shut down my PC (it's about 23h.00 in Belgium).&lt;/P&gt;
&lt;P&gt;Maybe the question will get solved meanwhile. I will notice tomorrow.&lt;/P&gt;
&lt;P&gt;By the way: there's a special board for Statistical Procedures under Analytics. Next time, try that one. Some statisticians don't look into the programming board.&lt;/P&gt;
&lt;P&gt;For data step programming though, the programming board is fabulous (high quality responses at a fast pace).&lt;/P&gt;
&lt;P&gt;Good luck,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 20:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734810#M35663</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-04-16T20:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734811#M35664</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Koen,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;Thank you for your advice and have a great weekend!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 21:04:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734811#M35664</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-16T21:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734818#M35665</link>
      <description>&lt;P&gt;Just one more remark before I shut down.&lt;/P&gt;
&lt;P&gt;Are you really dealing with survey data?&lt;/P&gt;
&lt;P&gt;If not, there is a wealth of other procedures in SAS/STAT your question could be answered with.&lt;/P&gt;
&lt;P&gt;There's a recent video in the 'Ask the Expert' board that may be of interest:&lt;/P&gt;
&lt;P&gt;What Are Best Practices for Using SAS® Survey Procedures? Q&amp;amp;A, Slides, and On-Demand Recording&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Ask-the-Expert/What-Are-Best-Practices-for-Using-SAS-Survey-Procedures-Q-amp-A/ta-p/706830" target="_blank"&gt;https://communities.sas.com/t5/Ask-the-Expert/What-Are-Best-Practices-for-Using-SAS-Survey-Procedures-Q-amp-A/ta-p/706830&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I suppose the webinar also explains when to use proc surveymeans, instead of just means, ttest, glm, mixed, anova, ...&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 21:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734818#M35665</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-04-16T21:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveymeans: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734820#M35666</link>
      <description>&lt;P&gt;Thank you, Koen, for your thoughts and for sharing the webinar. My dataset is based on a real survey. I am not sure if I really need to use SURVEYMEANS though! I think only with this procedure I can&amp;nbsp;account for the complex survey design I have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I will check this webinar and that may answer all my questions. Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 21:19:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/734820#M35666</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-16T21:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735014#M35668</link>
      <description>&lt;P&gt;Assuming your data came from a probability survey design, your objectives is to compute finite population stats and make inferences about finite population and you know the two cities population total. then you can try the following code for a scarified random sample design:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveymeans data=&amp;amp;dataset N=(city1total city2total) nomcar nobs mean stderr var cv clm min max median plots=none;
var coffee_spent ;
domain cities*gender;
domain cities('city1')*gender;
domain cities*gender/diff bon;
strata cities;
weight &amp;amp;weight_var;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Providing city1 and city2 totals will apply the finite population adjustment.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 04:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735014#M35668</guid>
      <dc:creator>gcjfernandez</dc:creator>
      <dc:date>2021-04-18T04:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735325#M35687</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A class="trigger-hovercard" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/27741" target="_blank"&gt;gcjfernandez&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;I think your code answers my question. You incorporated a comparison between the two levels of cities and the two levels of gender in your code. To help me understand it better, may please write the code for comparing only cities?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 17:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735325#M35687</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-19T17:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735423#M35695</link>
      <description>&lt;P&gt;Please see the requested SURVEYMEANS code below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveymeans data=&amp;amp;dataset N=(city1total city2total) nomcar nobs mean stderr var cv clm min max median ;
var coffee_spent ;
/*to get finite pop estimates by all levels of subpopulation cities */
domain cities;
/*to get finite pop estimates by selected level of subpopulation cities=city1 */
domain cities('city1');
/*to get all pairwise comparison with Bonferroni adjustment between all levels of subpopulation city */
domain cities/diff bon;
strata cities;
weight &amp;amp;weight_var;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Apr 2021 05:50:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735423#M35695</guid>
      <dc:creator>gcjfernandez</dc:creator>
      <dc:date>2021-04-20T05:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735429#M35696</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;A class="trigger-hovercard" href="https://communities.sas.com/t5/user/viewprofilepage/user-id/27741" target="_blank"&gt;gcjfernandez&lt;/A&gt;, for the code and your notes.&lt;/P&gt;
&lt;P&gt;How does it work to have CITIES as both DOMAIN and STRATA?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 06:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735429#M35696</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-20T06:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735430#M35697</link>
      <description>Following the SAS documentation you can use the same variable as STRATA and DOMAIN:&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_surveymeans_examples06.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_surveymeans_examples06.htm&lt;/A&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 20 Apr 2021 06:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735430#M35697</guid>
      <dc:creator>gcjfernandez</dc:creator>
      <dc:date>2021-04-20T06:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing means from two independent samples</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735431#M35698</link>
      <description>Thank you!</description>
      <pubDate>Tue, 20 Apr 2021 06:30:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Comparing-means-from-two-independent-samples/m-p/735431#M35698</guid>
      <dc:creator>Emma_at_SAS</dc:creator>
      <dc:date>2021-04-20T06:30:48Z</dc:date>
    </item>
  </channel>
</rss>

