<?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: how to generate predicted variable value using the new values of independent variable? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396976#M95905</link>
    <description>&lt;P&gt;The term you're looking for is 'score' a model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do this several ways in SAS, partly depending on the PROC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the methods illustrated here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As others have commented give your sample this isn't appropriate but I'm going to assume it was a mock up. At the end of the data, the validity is up to you.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Sep 2017 21:32:00 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-09-18T21:32:00Z</dc:date>
    <item>
      <title>how to generate predicted variable value using the new values of independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396967#M95901</link>
      <description>&lt;P&gt;Here I have the dataset and code like the following,&lt;/P&gt;&lt;P&gt;and since there is only 4 datapoints of x, the output table will contain only 4 prediced value of y.&lt;/P&gt;&lt;P&gt;What I want is the predicted values of y when x varies from 1 to 40, is that possible to generate the table in SAS? I know it's convenient to use the regression model to generate the results in EXCEL ,but I wonder if it's ok that I complete all of the steps in SAS.&amp;nbsp;&lt;/P&gt;&lt;P&gt;THank you!!!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
    input x y;
    cards;
     1  0.992010835
     2  0.966176685
     3  0.955358056
     4  0.941511026
;
run;

proc glm data= a;
   model y= x;
   output out= outa p=predy r=resid;
run;&lt;BR /&gt;&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 21:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396967#M95901</guid>
      <dc:creator>Linmuxi</dc:creator>
      <dc:date>2017-09-18T21:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate predicted variable value using the new values of independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396970#M95902</link>
      <description>&lt;P&gt;Even if you were to make such predictions, they would never in any way be considered&amp;nbsp;statistically valid.&amp;nbsp; If X ranges from 1 to 4 in your modeling data set, you can only make predictions for X in the range of 1 to 4.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 21:12:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396970#M95902</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-09-18T21:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate predicted variable value using the new values of independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396972#M95904</link>
      <description>&lt;P&gt;Not that your sample is likely good enough but use this input data set and look at the output data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data a;
    input x y;
cards;
1  0.992010835
2  0.966176685
3  0.955358056
4  0.941511026
5   .                                                                                             
6   .                                                                                             
7   .                                                                                             
8   .                                                                                             
9   .                                                                                             
10  .                                                                                             
11  .                                                                                             
12  .                                                                                             
13  .                                                                                             
14  .                                                                                             
15  .                                                                                             
16  .                                                                                             
17  .                                                                                             
18  .                                                                                             
19  .                                                                                             
20  .                                                                                             
21  .                                                                                             
22  .                                                                                             
23  .                                                                                             
24  .                                                                                             
25  .                                                                                             
26  .                                                                                             
27  .                                                                                             
28  .                                                                                             
29  .                                                                                             
30  .                                                                                             
31  .                                                                                             
32  .                                                                                             
33  .                                                                                             
34  .                                                                                             
35  .                                                                                             
36  .                                                                                             
37  .                                                                                             
38  .                                                                                             
39  .                                                                                             
40  .     
;
run;
&lt;/PRE&gt;
&lt;P&gt;And place a QUIT; at the end of your Proc Glm;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 21:20:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396972#M95904</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-09-18T21:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate predicted variable value using the new values of independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396976#M95905</link>
      <description>&lt;P&gt;The term you're looking for is 'score' a model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can do this several ways in SAS, partly depending on the PROC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the methods illustrated here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As others have commented give your sample this isn't appropriate but I'm going to assume it was a mock up. At the end of the data, the validity is up to you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Sep 2017 21:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396976#M95905</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-18T21:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate predicted variable value using the new values of independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396990#M95908</link>
      <description>&lt;P&gt;A crude but simple method is with the CODE statement :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
filename t temp;

proc glm data= a;
   model y= x;
   code file=t;
run;
quit;

data b;
do x = 1 to 40;
    %include t;
    output;
    end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Sep 2017 22:32:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396990#M95908</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-09-18T22:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to generate predicted variable value using the new values of independent variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396996#M95913</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With only one predictor below data step&amp;nbsp;can be used for the predicted values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;do X=1 to 40;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; predy=1.004343665 - 0.016231806*X;&lt;BR /&gt;&amp;nbsp; &amp;nbsp;output;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 00:49:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-generate-predicted-variable-value-using-the-new-values-of/m-p/396996#M95913</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2017-09-19T00:49:13Z</dc:date>
    </item>
  </channel>
</rss>

