<?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: proc surveyreg in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715647#M27384</link>
    <description>&lt;P class="p1"&gt;Hello, one more question.&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;I used following code to try to get the residual:&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;ods graphics on&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;&lt;STRONG&gt;SURVEYREG&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;DATA&lt;/SPAN&gt;= nh.outcomes&amp;nbsp;&lt;SPAN class="s3"&gt;nomcar&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;STRATA&lt;/SPAN&gt; sdmvstra;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;CLUSTER&lt;/SPAN&gt; sdmvpsu;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;CLASS&lt;/SPAN&gt; alpha16 age RIAGENDR PIR SDDSRVYR RIDRETH1;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;WEIGHT&lt;/SPAN&gt; glucwt4yr;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;DOMAIN&lt;/SPAN&gt; eligible;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;model&lt;/SPAN&gt; BMXBMI= age RIAGENDR PIR SDDSRVYR RIDRETH1 EIEER totalcounts alpha16/ &lt;SPAN class="s3"&gt;stb&lt;/SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;adjrsq&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;clparm&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;solution&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;vadjust&lt;/SPAN&gt;=none &lt;SPAN class="s3"&gt;COVB&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;lsmeans&lt;/SPAN&gt; alpha16/ &lt;SPAN class="s3"&gt;lines&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;adjust&lt;/SPAN&gt;=tukey;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;output&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;out&lt;/SPAN&gt;=bmi &lt;SPAN class="s3"&gt;p&lt;/SPAN&gt;= predict &lt;SPAN class="s3"&gt;r&lt;/SPAN&gt; = residual ;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;ods graphics off&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;But could you please tell me how to plot the residual? I tried proc forecast and proc sgplot statements, but they are not working&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;forecast&lt;/STRONG&gt;&lt;SPAN class="s1"&gt; data=bmi &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;out=pred outfull outresid;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;id&lt;/SPAN&gt; seqn;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;var&lt;/SPAN&gt; age RIAGENDR PIR SDDSRVYR RIDRETH1 EIEER totalcounts alpha16;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sgplot&lt;/STRONG&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;=pred;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;where&lt;/SPAN&gt; _type_=&lt;SPAN class="s3"&gt;'RESIDUAL'&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;needle&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;x&lt;/SPAN&gt;=seqn &lt;SPAN class="s2"&gt;y&lt;/SPAN&gt;=age RIAGENDR PIR SDDSRVYR RIDRETH1 EIEER totalcounts alpha16 / &lt;SPAN class="s2"&gt;markers&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 31 Jan 2021 18:45:01 GMT</pubDate>
    <dc:creator>knighsson</dc:creator>
    <dc:date>2021-01-31T18:45:01Z</dc:date>
    <item>
      <title>proc surveyreg</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715591#M27375</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;When we try to use linear regression, we need to do the diagnostics first. So I wonder when I use "proc surveyreg" to investigate the linear regression, should I use "proc reg" statement to do the diagnostics test (residual plot ...) or should I use "proc surveyreg" statement to do the diagnostics? If I should use "proc surveyreg" statement, how can I get the residual plot?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jan 2021 22:08:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715591#M27375</guid>
      <dc:creator>knighsson</dc:creator>
      <dc:date>2021-01-30T22:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyreg</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715601#M27378</link>
      <description>&lt;P&gt;Which specific diagnostics are you wanting?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the data comes from a complex sample and requires Proc Surveyreg then Reg is very likely not the tool to use for diagnostics. Proc Reg would not properly apply the weights from a complex sample and so the residuals would be extremely likely to be incorrect.&lt;/P&gt;
&lt;P&gt;Perhaps Surveymeans or Surveyfreq would come into play.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 01:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715601#M27378</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-01-31T01:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyreg</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715633#M27381</link>
      <description>&lt;P&gt;Thank you so much!&lt;/P&gt;
&lt;P&gt;I want to check the assumption of linear regression including residual normality, outliers, linear relationship between dependent variable and independent variables, homogeneity, and multicollinearity. could you please tell me how to do those test in proc surveyreg statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 16:17:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715633#M27381</guid>
      <dc:creator>knighsson</dc:creator>
      <dc:date>2021-01-31T16:17:40Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyreg</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715634#M27382</link>
      <description>&lt;P&gt;You can output the residuals from PROC SURVEYREG using the OUTPUT statement, and then you can plot them to take care of "residual normality, outliers, linear relationship between dependent variable and independent variables, homogeneity". I think the COVB option in the MODEL statement would address multicollinearity.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 16:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715634#M27382</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-01-31T16:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyreg</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715644#M27383</link>
      <description>Thank you so much, that would be very helpful!&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 31 Jan 2021 17:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715644#M27383</guid>
      <dc:creator>knighsson</dc:creator>
      <dc:date>2021-01-31T17:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyreg</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715647#M27384</link>
      <description>&lt;P class="p1"&gt;Hello, one more question.&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;I used following code to try to get the residual:&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;ods graphics on&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s2"&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;&lt;STRONG&gt;SURVEYREG&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;DATA&lt;/SPAN&gt;= nh.outcomes&amp;nbsp;&lt;SPAN class="s3"&gt;nomcar&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;STRATA&lt;/SPAN&gt; sdmvstra;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;CLUSTER&lt;/SPAN&gt; sdmvpsu;&amp;nbsp;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;CLASS&lt;/SPAN&gt; alpha16 age RIAGENDR PIR SDDSRVYR RIDRETH1;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;WEIGHT&lt;/SPAN&gt; glucwt4yr;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;DOMAIN&lt;/SPAN&gt; eligible;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;model&lt;/SPAN&gt; BMXBMI= age RIAGENDR PIR SDDSRVYR RIDRETH1 EIEER totalcounts alpha16/ &lt;SPAN class="s3"&gt;stb&lt;/SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;adjrsq&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;clparm&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;solution&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;vadjust&lt;/SPAN&gt;=none &lt;SPAN class="s3"&gt;COVB&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;lsmeans&lt;/SPAN&gt; alpha16/ &lt;SPAN class="s3"&gt;lines&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;adjust&lt;/SPAN&gt;=tukey;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="s3"&gt;output&lt;/SPAN&gt; &lt;SPAN class="s3"&gt;out&lt;/SPAN&gt;=bmi &lt;SPAN class="s3"&gt;p&lt;/SPAN&gt;= predict &lt;SPAN class="s3"&gt;r&lt;/SPAN&gt; = residual ;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;ods graphics off&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;But could you please tell me how to plot the residual? I tried proc forecast and proc sgplot statements, but they are not working&lt;/P&gt;
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;forecast&lt;/STRONG&gt;&lt;SPAN class="s1"&gt; data=bmi &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;out=pred outfull outresid;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;id&lt;/SPAN&gt; seqn;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;var&lt;/SPAN&gt; age RIAGENDR PIR SDDSRVYR RIDRETH1 EIEER totalcounts alpha16;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sgplot&lt;/STRONG&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;=pred;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;where&lt;/SPAN&gt; _type_=&lt;SPAN class="s3"&gt;'RESIDUAL'&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;needle&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;x&lt;/SPAN&gt;=seqn &lt;SPAN class="s2"&gt;y&lt;/SPAN&gt;=age RIAGENDR PIR SDDSRVYR RIDRETH1 EIEER totalcounts alpha16 / &lt;SPAN class="s2"&gt;markers&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p3"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 18:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715647#M27384</guid>
      <dc:creator>knighsson</dc:creator>
      <dc:date>2021-01-31T18:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc surveyreg</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715667#M27385</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/317476"&gt;@knighsson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;sgplot&lt;/STRONG&gt; &lt;SPAN class="s2"&gt;data&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;=pred;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;where&lt;/SPAN&gt; _type_=&lt;SPAN class="s3"&gt;'RESIDUAL'&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;needle&lt;/SPAN&gt; &lt;SPAN class="s2"&gt;x&lt;/SPAN&gt;=seqn &lt;SPAN class="s2"&gt;y&lt;/SPAN&gt;=age RIAGENDR PIR SDDSRVYR RIDRETH1 EIEER totalcounts alpha16 / &lt;SPAN class="s2"&gt;markers&lt;/SPAN&gt;;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The NEEDLE statement allows only one variable after Y=. But I doubt you really want a NEEDLE here, looking at residuals is usually done via scatter plots, so you can use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=p1lcbd3lhs3t3bn1jk6d8sjt2yqx.htm&amp;amp;locale=en" target="_self"&gt;SCATTER&lt;/A&gt; statement.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Regarding _type_='RESIDUAL', you need to look (with your own eyes) inside the data set that is created named BMI (it is not named PRED) and see how the data set is structured, that will identify if you need a WHERE statement and what the WHERE statement should say; and it will identify the variable names you can use. Essentially, if you look at BMI with your own eyes, you will see everything you need to code some sort of residual plot.&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 22:07:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-surveyreg/m-p/715667#M27385</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-01-31T22:07:30Z</dc:date>
    </item>
  </channel>
</rss>

