<?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: Question about estimate statements in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897615#M354719</link>
    <description>&lt;P&gt;Hi Paige,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you add other covariates in the lsmeans statement? In addition to setting hsiscore=2, I would like to include the other model covariates in the lsmeans&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;proc surveyreg data=Analyze;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;cluster psu2;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;stratum strata2; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;weight weight2;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;domain&amp;nbsp; keep2('1');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;class acescore female ethnic incgt30k1 hsedu married insurance1 engpref1 nativity ;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;model sbpchangemed = acescore age1 followuptime2 female ethnic incgt30k1 hsedu married&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;insurance1 engpref1 nativity bmi1 sbp1med hsiscore acescore*hsiscore /solution clparm anova;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;lsmeans acescore&amp;nbsp; / at hsiscore =2&amp;nbsp; &amp;nbsp;age1 followuptime2 female 0 1 ethnic 1 2 3 4 5 6 7 incgt30k1 0 1 2 hsedu 0 1 married 0 1 insurance1 0 1&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;engpref1 0 1 nativity 1 2 3 bmi1 sbp1med ; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;r&lt;/SPAN&gt;&lt;SPAN&gt;un ;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 06 Oct 2023 17:15:20 GMT</pubDate>
    <dc:creator>talktorob</dc:creator>
    <dc:date>2023-10-06T17:15:20Z</dc:date>
    <item>
      <title>Question about estimate statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/896685#M354324</link>
      <description>&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;I am trying to estimate the means of a continuous outcome called 'sbpchangemed' at different levels of a categorical variable (called acescore with 5 levels) (exposure)&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;&lt;STRONG&gt;at three different values of a continuous variable (called hsiscore)&lt;/STRONG&gt;&lt;/U&gt;.&amp;nbsp; I found the mean within each tertile of hsiscore. Tertile 1, low, has a mean of 2.0. Tertile 2, medium, has a mean of 10.3, and Tertile 3, high, has a mean of 29.5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to estimate the change in sbpchangemed by acescore at &lt;U&gt;a hsiscore of 2, a hsiscore of 10.3, and a hsiscore of 29.5&lt;/U&gt;. I have added the table shell below for context.&lt;/P&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I obtain estimates&amp;nbsp;when I run the code below. However, I have not interpreted estimate statements in quite some time.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;U&gt;&lt;STRONG&gt;Question:&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;Could someone please review the code below and assess whether this outputs the table shell data correctly?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;proc surveyreg data=Analyze;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;cluster psu2;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;stratum strata2; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;weight weight2;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;domain&amp;nbsp; keep2('1');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;class acescore female ethnic incgt30k1 hsedu married insurance1 engpref1 nativity ;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;model &lt;STRONG&gt;sbpchangemed&lt;/STRONG&gt; = &lt;STRONG&gt;acescore&lt;/STRONG&gt; age1 followuptime2 female ethnic incgt30k1 hsedu married&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;insurance1 engpref1 nativity bmi1 sbp1med hsiscore acescore*hsiscore /solution clparm anova;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;estimate "1 vs 0 hsiscore =2" acescore -1 1 0 0 0 hsiscore 2 ;&lt;BR /&gt;estimate "2 vs 0 hsiscore =2" acescore -1 0 1 0 0 hsiscore 2 ;&lt;BR /&gt;estimate "3 vs 0 hsiscore =2" acescore -1 0 0 1 0 hsiscore 2 ;&lt;BR /&gt;estimate "4+ vs 0 hsiscore =2" acescore -1 0 0 0 1 hsiscore 2 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;estimate "1 vs 0 hsiscore =10.3" acescore -1 1 0 0 0 hsiscore 10.3 ;&lt;BR /&gt;estimate "2 vs 0 hsiscore =10.3" acescore -1 0 1 0 0 hsiscore 10.3 ;&lt;BR /&gt;estimate "3 vs 0 hsiscore =10.3" acescore -1 0 0 1 0 hsiscore 10.3 ;&lt;BR /&gt;estimate "4+ vs 0 hsiscore =10.3" acescore -1 0 0 0 1 hsiscore 10.3 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;estimate "1 vs 0 hsiscore = 29.5" acescore -1 1 0 0 0 hsiscore 29.5 ;&lt;BR /&gt;estimate "2 vs 0 hsiscore = 29.5" acescore -1 0 1 0 0 hsiscore 29.5 ;&lt;BR /&gt;estimate "3 vs 0 hsiscore = 29.5" acescore -1 0 0 1 0 hsiscore 29.5 ;&lt;BR /&gt;estimate "4+ vs 0 hsiscore = 29.5" acescore -1 0 0 0 1 hsiscore 29.5 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Table 3 screenshot.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/88470iB05FFCADBB76C993/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Table 3 screenshot.jpg" alt="Table 3 screenshot.jpg" /&gt;&lt;/span&gt;&lt;P&gt; &lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 02 Oct 2023 15:00:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/896685#M354324</guid>
      <dc:creator>talktorob</dc:creator>
      <dc:date>2023-10-02T15:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Question about estimate statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/896698#M354331</link>
      <description>&lt;P&gt;In my view, when the coefficients of an ESTIMATE statement are all ±ones or zeros, then there really is no need to use an ESTIMATE statement at all, the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_introcom_sect041.htm" target="_self"&gt;LSMEANS statement&lt;/A&gt; will do the job, with much less programming effort. And since the LSMEANS statement has the AT= option for setting the value of a covariate, it seems to meet your needs here.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 16:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/896698#M354331</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-02T16:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Question about estimate statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897604#M354710</link>
      <description>&lt;P&gt;Dear Paige,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your feedback.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to include all the co-variates from the model statement in the estimate statement as well. Some of those coefficients are not 0 or 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the estimate statement appropriate for this analysis?&lt;/P&gt;&lt;P&gt;When I run the code below, the estimate statement does not output any result. Can you advise on the structure of the estimate statement?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;proc surveyreg data=Analyze;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;cluster psu2;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;stratum strata2; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;weight weight2;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;domain&amp;nbsp; keep2('1');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;class acescore female ethnic incgt30k1 hsedu married insurance1 engpref1 nativity ;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;model sbpchangemed = acescore age1 followuptime2 female ethnic incgt30k1 hsedu married&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; insurance1 engpref1 nativity bmi1 sbp1med hsiscore acescore*hsiscore /solution clparm anova;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;estimate "1 vs 0 hsiscore =2" acescore -1 1 0 0 0 hsiscore 2 age1 41.5 followuptime2 5.8 female 0 1 ethnic 1 2 3 4 5 6 7 incgt30k1 0 1 2 hsedu 0 1 married 0 1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;insurance1 0 1&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;engpref1 0 1 nativity 1 2 3 bmi1 29.5 sbp1med 121.5 hsiscore 13.6 ;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;run;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Oct 2023 16:38:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897604#M354710</guid>
      <dc:creator>talktorob</dc:creator>
      <dc:date>2023-10-06T16:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: Question about estimate statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897609#M354714</link>
      <description>&lt;P&gt;It seems as if you have ignored my advice to use LSMEANS, and it seems as if you didn't look at the AT= option for setting values of covariates in LSMEANS as explained in the documentation I linked to. Please try LSMEANS and not ESTIMATE for this situation.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 16:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897609#M354714</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-06T16:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: Question about estimate statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897615#M354719</link>
      <description>&lt;P&gt;Hi Paige,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do you add other covariates in the lsmeans statement? In addition to setting hsiscore=2, I would like to include the other model covariates in the lsmeans&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;proc surveyreg data=Analyze;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;cluster psu2;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;stratum strata2; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;weight weight2;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;domain&amp;nbsp; keep2('1');&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;class acescore female ethnic incgt30k1 hsedu married insurance1 engpref1 nativity ;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;model sbpchangemed = acescore age1 followuptime2 female ethnic incgt30k1 hsedu married&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;insurance1 engpref1 nativity bmi1 sbp1med hsiscore acescore*hsiscore /solution clparm anova;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;lsmeans acescore&amp;nbsp; / at hsiscore =2&amp;nbsp; &amp;nbsp;age1 followuptime2 female 0 1 ethnic 1 2 3 4 5 6 7 incgt30k1 0 1 2 hsedu 0 1 married 0 1 insurance1 0 1&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;engpref1 0 1 nativity 1 2 3 bmi1 sbp1med ; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;r&lt;/SPAN&gt;&lt;SPAN&gt;un ;&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 06 Oct 2023 17:15:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897615#M354719</guid>
      <dc:creator>talktorob</dc:creator>
      <dc:date>2023-10-06T17:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Question about estimate statements</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897632#M354729</link>
      <description>&lt;P&gt;The link I gave has actual examples of a situation where more than one covariate is present.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 18:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Question-about-estimate-statements/m-p/897632#M354729</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-06T18:26:17Z</dc:date>
    </item>
  </channel>
</rss>

