<?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: i want do the REG Procedure in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/i-want-do-the-REG-Procedure/m-p/791359#M38789</link>
    <description>&lt;P&gt;I suppose you want to regress substance on value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you state regress obs on value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Furthermore you plug-in the wrong dataset to the proc reg, you should use the transposes one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And last but not least you carry over the sustance as char variable. proc reg can only work with numeric variables, even the clas variables on the right hand side need to be converted into dummy encoding. proc glm would be an alternative, but that's&amp;nbsp; not the case here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you stick to using substance as target variable in char format then we're going to a multinomial model and proc logistic or proc genmod would be your candidate.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or you use substance as numeric variable, then it works with the following code.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA outdata;
INPUT Substance  obs1-obs10;
DATALINES;
1 29 28 23 26 26 19 25 29 26 28
2 17 25 24 19 28 21 20 25 19 24
3 17 16 21 22 23 18 20 17 25 21
4 18 20 25 24 16 20 20 17 19 17
;
title "assignment1 data";

proc transpose data=outdata out=narrowdata(rename=(col1=value))
name=Dosageatdeath;
by substance;
RUN;

proc print data=narrowdata;
run;



ods graphics on;
proc reg data=WORK.NARROWDATA plots(modelLabel only)=ResidualByPredicted;
model substance='value'n;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;b&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 09:06:58 GMT</pubDate>
    <dc:creator>acordes</dc:creator>
    <dc:date>2022-01-21T09:06:58Z</dc:date>
    <item>
      <title>i want do the REG Procedure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/i-want-do-the-REG-Procedure/m-p/791342#M38786</link>
      <description>&lt;P&gt;hello, so my data has 4 levels and each level have 10 observation, so i would like to do the reg procedure, but when i run the code it shows that the variable is not working, i don't know why it's happened, i mean i support using the one-way ANOVA model (the factor effects model of ANOVA model I ) and it s anyone can help me with this, so appreciate&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA outdata;&lt;BR /&gt;INPUT Substance $ obs1-obs10;&lt;BR /&gt;DATALINES;&lt;BR /&gt;1 29 28 23 26 26 19 25 29 26 28&lt;BR /&gt;2 17 25 24 19 28 21 20 25 19 24&lt;BR /&gt;3 17 16 21 22 23 18 20 17 25 21&lt;BR /&gt;4 18 20 25 24 16 20 20 17 19 17&lt;BR /&gt;;&lt;BR /&gt;title "assignment1 data";&lt;BR /&gt;&lt;BR /&gt;proc transpose data=outdata out=narrowdata(rename=(col1=value))&lt;BR /&gt;name=Dosageatdeath;&lt;BR /&gt;by substance;&lt;BR /&gt;RUN;&lt;BR /&gt;proc print data=narrowdata;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods graphics on;&lt;BR /&gt;proc reg data=outdata plots(modelLabel only)=ResidualByPredicted;&lt;BR /&gt;model obs=Value;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 04:41:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/i-want-do-the-REG-Procedure/m-p/791342#M38786</guid>
      <dc:creator>tmorr</dc:creator>
      <dc:date>2022-01-21T04:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: i want do the REG Procedure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/i-want-do-the-REG-Procedure/m-p/791345#M38787</link>
      <description>&lt;P&gt;Post the log for starters.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 04:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/i-want-do-the-REG-Procedure/m-p/791345#M38787</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-21T04:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: i want do the REG Procedure</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/i-want-do-the-REG-Procedure/m-p/791359#M38789</link>
      <description>&lt;P&gt;I suppose you want to regress substance on value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you state regress obs on value.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Furthermore you plug-in the wrong dataset to the proc reg, you should use the transposes one.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And last but not least you carry over the sustance as char variable. proc reg can only work with numeric variables, even the clas variables on the right hand side need to be converted into dummy encoding. proc glm would be an alternative, but that's&amp;nbsp; not the case here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you stick to using substance as target variable in char format then we're going to a multinomial model and proc logistic or proc genmod would be your candidate.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or you use substance as numeric variable, then it works with the following code.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA outdata;
INPUT Substance  obs1-obs10;
DATALINES;
1 29 28 23 26 26 19 25 29 26 28
2 17 25 24 19 28 21 20 25 19 24
3 17 16 21 22 23 18 20 17 25 21
4 18 20 25 24 16 20 20 17 19 17
;
title "assignment1 data";

proc transpose data=outdata out=narrowdata(rename=(col1=value))
name=Dosageatdeath;
by substance;
RUN;

proc print data=narrowdata;
run;



ods graphics on;
proc reg data=WORK.NARROWDATA plots(modelLabel only)=ResidualByPredicted;
model substance='value'n;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;b&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 09:06:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/i-want-do-the-REG-Procedure/m-p/791359#M38789</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-01-21T09:06:58Z</dc:date>
    </item>
  </channel>
</rss>

