<?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 Reg / GLM in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Reg-GLM/m-p/16314#M390</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have a question about Proc Reg or GLM about prediction. I was trying to use proc reg and proc glm to make prediction. I have a code as follow:&lt;BR /&gt;
&lt;BR /&gt;
proc glm data=Sports_Wins_vs_Spending;&lt;BR /&gt;
  model wins = spending / P;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
Let's say I have the following data:&lt;BR /&gt;
Wins Spending&lt;BR /&gt;
30     50&lt;BR /&gt;
35     55&lt;BR /&gt;
60     57&lt;BR /&gt;
44     68&lt;BR /&gt;
&lt;BR /&gt;
The option "P" gives me the predicted value at each of the spending level that I have in the dataset (50, 55, 57, 68). However, there is a specific Spending I would like to use to predict the Number of Wins for the team. Can anyone tell me what would be the code to specify the Spending that I want (say, 45) in the model and get the predictive boundary (say 95%) for that predicted value?</description>
    <pubDate>Wed, 08 Apr 2009 02:00:55 GMT</pubDate>
    <dc:creator>kisam</dc:creator>
    <dc:date>2009-04-08T02:00:55Z</dc:date>
    <item>
      <title>Proc Reg / GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Reg-GLM/m-p/16314#M390</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I have a question about Proc Reg or GLM about prediction. I was trying to use proc reg and proc glm to make prediction. I have a code as follow:&lt;BR /&gt;
&lt;BR /&gt;
proc glm data=Sports_Wins_vs_Spending;&lt;BR /&gt;
  model wins = spending / P;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
Let's say I have the following data:&lt;BR /&gt;
Wins Spending&lt;BR /&gt;
30     50&lt;BR /&gt;
35     55&lt;BR /&gt;
60     57&lt;BR /&gt;
44     68&lt;BR /&gt;
&lt;BR /&gt;
The option "P" gives me the predicted value at each of the spending level that I have in the dataset (50, 55, 57, 68). However, there is a specific Spending I would like to use to predict the Number of Wins for the team. Can anyone tell me what would be the code to specify the Spending that I want (say, 45) in the model and get the predictive boundary (say 95%) for that predicted value?</description>
      <pubDate>Wed, 08 Apr 2009 02:00:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Reg-GLM/m-p/16314#M390</guid>
      <dc:creator>kisam</dc:creator>
      <dc:date>2009-04-08T02:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Reg / GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Reg-GLM/m-p/16315#M391</link>
      <description>Try the ESTIMATE statement.  I think that something like this would work:&lt;BR /&gt;
&lt;BR /&gt;
ESTIMATE 'Spending is 45' spending 45/CLPARM;</description>
      <pubDate>Wed, 08 Apr 2009 13:13:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Reg-GLM/m-p/16315#M391</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2009-04-08T13:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Reg / GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Proc-Reg-GLM/m-p/16316#M392</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
You may want to try the following code:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data s;&lt;BR /&gt;
input wins spending;&lt;BR /&gt;
datalines;&lt;BR /&gt;
30 50&lt;BR /&gt;
35 55&lt;BR /&gt;
60 57&lt;BR /&gt;
44 68&lt;BR /&gt;
.   45&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
proc reg data=s;&lt;BR /&gt;
model wins=spending;&lt;BR /&gt;
output out=predict&lt;BR /&gt;
  p=wins_pred &lt;BR /&gt;
  LCL=wins_95LCL&lt;BR /&gt;
  UCL=wins_95UCL ;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=predict(where=(wins=.)) noobs;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In the output window you'll see predicted wins (wins_pred) for spending=45 along with the lower (wins_95LCL) and upper (wins_95UCL) bounds of 95% CI for an individual prediction.&lt;BR /&gt;
&lt;BR /&gt;
More about an OUTPUT statement in PROC REG:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/statug/59654/HTML/default/statug_reg_sect015.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/statug/59654/HTML/default/statug_reg_sect015.htm&lt;/A&gt;

Message was edited by: statsplank</description>
      <pubDate>Wed, 08 Apr 2009 21:14:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Proc-Reg-GLM/m-p/16316#M392</guid>
      <dc:creator>statsplank</dc:creator>
      <dc:date>2009-04-08T21:14:40Z</dc:date>
    </item>
  </channel>
</rss>

