<?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 Proc surveyreg in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-surveyreg/m-p/910336#M45183</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running both simple linear regression and multiple linear regression using proc surveyreg. I have 2 types of variables: Total score (continuous dependent variable) and Q (binary independent variable coded as 0=negative response and 1=affirmative response) the log looks alright, there is no error message or any special note. I was expecting to get regression coefficients table which I got but instead of one coefficient for each independent variable, I keep getting 2 coefficients (one for 0 and another for 1). I want SAS to use the negative responses as the reference group and give me the coefficients for the affirmative responses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition, I want to do a backwards selection multiple linear regression. I have tried to add this specification in the code as it is usually done in the proc reg procedure but it is not working. If I could get ideas on how to do this procedure for complex data, I would greatly appreciate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a screenshot of the coefficients table I am getting for multiple linear regression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="astudent_0-1704314141558.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92234i080C1C859B02D70C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="astudent_0-1704314141558.png" alt="astudent_0-1704314141558.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the reference code from which I derived my multiple linear regression code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SURVEYREG data=analysis_data nomcar;
STRATA sdmvstra;
CLUSTER sdmvpsu;
WEIGHT wtmec4yr;
CLASS  sex ethn smoker dmdeduc bmicatf;
DOMAIN eligible;
MODEL  lbdhdl= sex ethn ridageyr smoker dmdeduc smoker bmicatf/solution;
run;  &lt;BR /&gt;&lt;BR /&gt;Here is a screenshot of the simple linear regression results:&lt;/PRE&gt;&lt;P&gt;Here is a screenshot of the simple linear regression results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="astudent_2-1704314764681.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92240i7E43218854468036/image-size/medium?v=v2&amp;amp;px=400" role="button" title="astudent_2-1704314764681.png" alt="astudent_2-1704314764681.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the reference code I used for the simple linear regression:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SURVEYREG data=analysis_data nomcar;
STRATA sdmvstra;
CLUSTER sdmvpsu;
WEIGHT wtmec4yr;
CLASS   bmicatf;
DOMAIN eligible;
MODEL   lbdhdl= bmicatf/ solution;
run;  &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 20:46:07 GMT</pubDate>
    <dc:creator>astudent</dc:creator>
    <dc:date>2024-01-03T20:46:07Z</dc:date>
    <item>
      <title>Proc surveyreg</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-surveyreg/m-p/910336#M45183</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running both simple linear regression and multiple linear regression using proc surveyreg. I have 2 types of variables: Total score (continuous dependent variable) and Q (binary independent variable coded as 0=negative response and 1=affirmative response) the log looks alright, there is no error message or any special note. I was expecting to get regression coefficients table which I got but instead of one coefficient for each independent variable, I keep getting 2 coefficients (one for 0 and another for 1). I want SAS to use the negative responses as the reference group and give me the coefficients for the affirmative responses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In addition, I want to do a backwards selection multiple linear regression. I have tried to add this specification in the code as it is usually done in the proc reg procedure but it is not working. If I could get ideas on how to do this procedure for complex data, I would greatly appreciate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a screenshot of the coefficients table I am getting for multiple linear regression:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="astudent_0-1704314141558.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92234i080C1C859B02D70C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="astudent_0-1704314141558.png" alt="astudent_0-1704314141558.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the reference code from which I derived my multiple linear regression code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SURVEYREG data=analysis_data nomcar;
STRATA sdmvstra;
CLUSTER sdmvpsu;
WEIGHT wtmec4yr;
CLASS  sex ethn smoker dmdeduc bmicatf;
DOMAIN eligible;
MODEL  lbdhdl= sex ethn ridageyr smoker dmdeduc smoker bmicatf/solution;
run;  &lt;BR /&gt;&lt;BR /&gt;Here is a screenshot of the simple linear regression results:&lt;/PRE&gt;&lt;P&gt;Here is a screenshot of the simple linear regression results:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="astudent_2-1704314764681.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/92240i7E43218854468036/image-size/medium?v=v2&amp;amp;px=400" role="button" title="astudent_2-1704314764681.png" alt="astudent_2-1704314764681.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the reference code I used for the simple linear regression:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;PROC SURVEYREG data=analysis_data nomcar;
STRATA sdmvstra;
CLUSTER sdmvpsu;
WEIGHT wtmec4yr;
CLASS   bmicatf;
DOMAIN eligible;
MODEL   lbdhdl= bmicatf/ solution;
run;  &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 20:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-surveyreg/m-p/910336#M45183</guid>
      <dc:creator>astudent</dc:creator>
      <dc:date>2024-01-03T20:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Proc surveyreg</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-surveyreg/m-p/910360#M45186</link>
      <description>&lt;P&gt;Suggestion when asking questions about output: Reference your variable names not what the variable means to you. You do not have anything in the code that shows a Q. So we have absolutely no idea which would be affected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would specify the reference level in the Class statement. For a specific variable it would look like:&lt;/P&gt;
&lt;P&gt;Class somevar (ref='0')&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 01:51:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-surveyreg/m-p/910360#M45186</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-01-04T01:51:56Z</dc:date>
    </item>
  </channel>
</rss>

