<?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: Dummy variables for years in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238840#M43890</link>
    <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response. I do not understand what you mean by having a difference of 3.&lt;/P&gt;
&lt;P&gt;What about my older statements? are they wron too?&lt;/P&gt;
&lt;DIV&gt;for type of payment( cash, stock, hybrid, other) we have 4 dummy variable:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;ps=0;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;pk=0;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;ph=0;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;po=0;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;if cs=1 then ps=1;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;if cs=2 then pk=1;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;if cs=3 then ph=1;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;if cs=4 then po=1;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Niloo&lt;/P&gt;</description>
    <pubDate>Fri, 11 Dec 2015 03:46:04 GMT</pubDate>
    <dc:creator>niloo</dc:creator>
    <dc:date>2015-12-11T03:46:04Z</dc:date>
    <item>
      <title>Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238838#M43888</link>
      <description>&lt;P&gt;&amp;nbsp;Hi everyone,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a sas program that i have been using and now I need to add &amp;nbsp;dummy variables for years and industry to&amp;nbsp;my variables&amp;nbsp;and then use these dummy variables in regressions. So I was thinking&amp;nbsp;of first adding a column called year:&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;year=year(Andate);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;and then the dummy variables :&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;zero=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;one=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;two=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;three=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;four=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;five=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;six=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;seven=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;eight=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;nine=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;ten=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;eleven=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;twelve=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;thirteen=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;fourteen=0;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2000 then zero=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2001 then one=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2002 then two=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2003 then three=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2004 then four=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2005 then five=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2006 then six=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2007 then seven=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2008 then eight=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2009 then nine=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2010 then ten=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2011 then eleven=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2012 then twelve=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2013 then thirteen=1;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;if year=2014 then fourteen=1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I correct?Also my professor&amp;nbsp;insists that&amp;nbsp;&lt;SPAN&gt; if the number of dummies is equal to the number of treatments, the regression will suffer from exact multicolinearity, so I have to have 13 dummies for year. If I only create 13 dummies for year (for example from 2000 to 2013) how can I run a regression on my dependant variable (carwindow1) and year 2014?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my other dummies that I have been using before: (only the dummy part )&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data a;&lt;BR /&gt;set ev.final2CarAn;&lt;BR /&gt;cs=.;&lt;BR /&gt;if ConsiStr='SHARES' then CS=1;&lt;BR /&gt;if ConsiStr='CASHO' then CS=2;&lt;BR /&gt;if ConsiStr='HYBRID' then CS=3;&lt;BR /&gt;if ConsiStr='OTHER' then CS=4;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ratio=.;&lt;BR /&gt;if amval4wp ne 0 and amval4wp ne . then&lt;BR /&gt;ratio=tmval4wp/amval4wp;&lt;BR /&gt;proc sort;&lt;BR /&gt;by type;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data ev.b;&lt;BR /&gt;set a;&lt;/P&gt;
&lt;P&gt;h=0;&lt;BR /&gt;v=0;&lt;BR /&gt;c=0;&lt;/P&gt;
&lt;P&gt;if type=1 then h=1;&lt;BR /&gt;if type=2 then v=1;&lt;BR /&gt;if type=3 then c=1;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ps=0;&lt;BR /&gt;pk=0;&lt;BR /&gt;ph=0;&lt;BR /&gt;po=0;&lt;/P&gt;
&lt;P&gt;if cs=1 then ps=1;&lt;BR /&gt;if cs=2 then pk=1;&lt;BR /&gt;if cs=3 then ph=1;&lt;BR /&gt;if cs=4 then po=1;&lt;/P&gt;
&lt;P&gt;la=0;&lt;BR /&gt;li=0;&lt;BR /&gt;if local=1 then la=1;&lt;BR /&gt;if local=0 then li=1;&lt;/P&gt;
&lt;P&gt;lnTEq=log(EqValAn);&lt;BR /&gt;lnTEn=log(EnValAn);&lt;BR /&gt;lnTMV=log(TMVal4wp);&lt;BR /&gt;lnAMV=log(amval4wp);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;And then I used the following statements to run regressions on each variable and my main variable (carwindow1):&lt;/P&gt;
&lt;P&gt;proc reg data=ev.b outest= estb tableout ADJRSQ;&lt;BR /&gt;model CARwindow1= h ;&lt;BR /&gt;run;&lt;BR /&gt;data est2 (keep= _type_ _ADJRSQ_ _RMSE_ intercept h v c ps pk ph po la li lnTMV lnTEq lnTEn ratio AEQW);&lt;BR /&gt;set estb;&lt;BR /&gt;run;&lt;BR /&gt;data _null_;&lt;BR /&gt;proc datasets force nolist;&lt;BR /&gt;append base=ev.result1&lt;BR /&gt;data=est2;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Niloo&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 03:21:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238838#M43888</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-11T03:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238839#M43889</link>
      <description>You need N-1 indicators. You actually have 15 years so you need 14 indicator variables, the one you leave out is your reference level - what you compare things to. &lt;BR /&gt;&lt;BR /&gt;Your sample code doesn't correctly account for the differing levels-rationally shares vs other having a difference of 3 doesn't make sense. &lt;BR /&gt;&lt;BR /&gt;You may find it helpful to look at PROC GLM and the CLASS statement, noting the reference level options.</description>
      <pubDate>Fri, 11 Dec 2015 03:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238839#M43889</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-11T03:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238840#M43890</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response. I do not understand what you mean by having a difference of 3.&lt;/P&gt;
&lt;P&gt;What about my older statements? are they wron too?&lt;/P&gt;
&lt;DIV&gt;for type of payment( cash, stock, hybrid, other) we have 4 dummy variable:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;ps=0;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;pk=0;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;ph=0;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;po=0;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;if cs=1 then ps=1;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;if cs=2 then pk=1;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;if cs=3 then ph=1;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT size="2"&gt;if cs=4 then po=1;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Niloo&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 03:46:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238840#M43890</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-11T03:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238843#M43891</link>
      <description>&lt;P&gt;If you absolutely need to use &lt;STRONG&gt;proc reg&lt;/STRONG&gt; then you could save some work by running &lt;STRONG&gt;proc glmmod&lt;/STRONG&gt; to create the dummy variables. It would look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
set ev.final2CarAn;
if amval4wp ne 0 and amval4wp ne . then
	ratio=tmval4wp/amval4wp;
lnTEq=log(EqValAn);
lnTEn=log(EnValAn);
lnTMV=log(TMVal4wp);
lnAMV=log(amval4wp);
year = year(Andate);
run;

proc glmmod data=a outdesign=b outparm=parm;
class ConsiStr type local year;
model carwindow1 = ratio lnTEq lnTEn lnTMV lnAMV ConsiStr type local year / noint;
run;

/* Check the meaning of col1, col2, etc. variables in the new dataset */
proc print data=parm; run;

/* If you want, rename the variables created by GLMMOD */
data c;
set b;
rename col1=ratio col2=lnTEq ....;
run;

proc reg data=c;
model carwindow1 = ....;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Dec 2015 04:27:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238843#M43891</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-11T04:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238891#M43906</link>
      <description>&lt;P&gt;PROC GLMMOD should be more widely known. Very useful procedure!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 13:42:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238891#M43906</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-12-11T13:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238928#M43921</link>
      <description>&lt;P&gt;Yes, I just wish it could generate more meaningful variable names, now that the limit has been increased to 32 characters.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 16:14:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/238928#M43921</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-11T16:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239092#M43951</link>
      <description>&lt;P&gt;Hi PGStats,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your solution. It is much more efficient than my previous statements. I revised my program and&amp;nbsp;have 3 question:&lt;/P&gt;
&lt;P&gt;1) Shall I add the variables that I want to include in the regression in this part?&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;proc glmmod data=a outdesign=b outparm=parm;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;class ConsiStr type year;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;model Acar1 = ratio lnTEq lnTEn lnTMV lnAMV lnSIZE ConsiStr type year&lt;FONT color="#FF6600"&gt;&amp;nbsp;(other variables)&lt;/FONT&gt;&amp;nbsp;/ noint;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;2) I have 15 years of data (2000-2014) and 15 dummy variables. Isn't this going to cause a&amp;nbsp;multicolinearity problem?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;3) If I want to creat another set of dummy variables for industry can I add this statement:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;data a;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;set ev.final2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;if amval4wp ne 0 and amval4wp ne . then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;ratio=tmval4wp/amval4wp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;lnTEq=log(EqValAn);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;lnTEn=log(EnValAn);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;lnTMV=log(TMVal4wp);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;lnAMV=log(amval4wp);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;lnSIZE=log(HOSTATASS);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;year = year(Andate);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF6600"&gt;Industry=&amp;nbsp;TMaCode;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;proc glmmod data=a outdesign=b outparm=parm;&lt;BR /&gt;&lt;SPAN&gt;class ConsiStr type year &lt;FONT color="#FF6600"&gt;Industry&lt;/FONT&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Here is how my statemets look like now:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname ev 'C:\Regression';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;***Majority All data set- Regression for Acquirors, CAR (-1, +1), announcment date ********/;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data final2;&lt;BR /&gt;set ev.final2(keep= tdscd ADSCD Aname Tname AnDate Wdate Acar1 Acar5 Tcar1 Tcar5 TobinQ Debtratio HOSTATASS AMVal4wp TMVal4wp&amp;nbsp;EqValAn EnValAn ConsiStr TNation type AEQW);&lt;BR /&gt;proc sort;&lt;BR /&gt;by adscd andate;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set ev.final2;&lt;/P&gt;
&lt;P&gt;if amval4wp ne 0 and amval4wp ne . then&lt;BR /&gt;ratio=tmval4wp/amval4wp;&lt;/P&gt;
&lt;P&gt;lnTEq=log(EqValAn);&lt;BR /&gt;lnTEn=log(EnValAn);&lt;BR /&gt;lnTMV=log(TMVal4wp);&lt;BR /&gt;lnAMV=log(amval4wp);&lt;BR /&gt;lnSIZE=log(HOSTATASS);&lt;BR /&gt;year = year(Andate);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glmmod data=a outdesign=b outparm=parm;&lt;BR /&gt;class ConsiStr type year;&lt;BR /&gt;model Acar1 = ratio lnTEq lnTEn lnTMV lnAMV lnSIZE ConsiStr type year / noint;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=parm; run;&lt;/P&gt;
&lt;P&gt;data c;&lt;BR /&gt;set b;&lt;BR /&gt;rename col1=ratio col2=lnTEq col3=lnTEn col4=lnTMV col5=lnAMV col6=lnSIZE col7=cash col8=hybrid col9=other col10=shares&lt;BR /&gt;col11=unknown col12=horizental col13=vertical col14=conglomerate col15=year0 col16=year1 col17=year2 col18=year3 col19=year4&lt;BR /&gt;col20=year5 col21=year6 col22=year7 col24=year9 col25=year10 col26=year11 col27=year12 col28=year13 col29=year14;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc reg data=c;&lt;BR /&gt;model Acar1 = lnSIZE;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much,&lt;/P&gt;
&lt;P&gt;Niloo&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 04:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239092#M43951</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-14T04:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239235#M43980</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/14154"&gt;@niloo&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi PGStats,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your solution. It is much more efficient than my previous statements. I revised my program and&amp;nbsp;have 3 question:&lt;/P&gt;
&lt;P&gt;1) Shall I add the variables that I want to include in the regression in this part?&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;proc glmmod data=a outdesign=b outparm=parm;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;class ConsiStr type year;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;model Acar1 = ratio lnTEq lnTEn lnTMV lnAMV lnSIZE ConsiStr type year&lt;FONT color="#FF6600"&gt;&amp;nbsp;(other variables)&lt;/FONT&gt;&amp;nbsp;/ noint;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, if you want the other variables in the regression. However, this seems needlessly complicated, you are planning to run PROC REG so you need DUMMY variables; but if you run the analysis in PROC GLM, you don't have to create the dummy variables yourself, PROC GLM does that for you internally.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;2) I have 15 years of data (2000-2014) and 15 dummy variables. Isn't this going to cause a&amp;nbsp;multicolinearity problem?&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again, this is all taken care of internally in PROC GLM, so why use PROC REG? Anyway, the NOINT option eliminates the multicollineary issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;3) If I want to creat another set of dummy variables for industry can I add this statement:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;data a;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;set ev.final2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;if amval4wp ne 0 and amval4wp ne . then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;ratio=tmval4wp/amval4wp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;lnTEq=log(EqValAn);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;lnTEn=log(EnValAn);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;lnTMV=log(TMVal4wp);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;lnAMV=log(amval4wp);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;lnSIZE=log(HOSTATASS);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;year = year(Andate);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF6600"&gt;Industry=&amp;nbsp;TMaCode;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#339966"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#339966"&gt;&lt;SPAN&gt;proc glmmod data=a outdesign=b outparm=parm;&lt;BR /&gt;&lt;SPAN&gt;class ConsiStr type year &lt;FONT color="#FF6600"&gt;Industry&lt;/FONT&gt;;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;Here is how my statemets look like now:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname ev 'C:\Regression';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;***Majority All data set- Regression for Acquirors, CAR (-1, +1), announcment date ********/;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;data final2;&lt;BR /&gt;set ev.final2(keep= tdscd ADSCD Aname Tname AnDate Wdate Acar1 Acar5 Tcar1 Tcar5 TobinQ Debtratio HOSTATASS AMVal4wp TMVal4wp&amp;nbsp;EqValAn EnValAn ConsiStr TNation type AEQW);&lt;BR /&gt;proc sort;&lt;BR /&gt;by adscd andate;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set ev.final2;&lt;/P&gt;
&lt;P&gt;if amval4wp ne 0 and amval4wp ne . then&lt;BR /&gt;ratio=tmval4wp/amval4wp;&lt;/P&gt;
&lt;P&gt;lnTEq=log(EqValAn);&lt;BR /&gt;lnTEn=log(EnValAn);&lt;BR /&gt;lnTMV=log(TMVal4wp);&lt;BR /&gt;lnAMV=log(amval4wp);&lt;BR /&gt;lnSIZE=log(HOSTATASS);&lt;BR /&gt;year = year(Andate);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glmmod data=a outdesign=b outparm=parm;&lt;BR /&gt;class ConsiStr type year;&lt;BR /&gt;model Acar1 = ratio lnTEq lnTEn lnTMV lnAMV lnSIZE ConsiStr type year / noint;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=parm; run;&lt;/P&gt;
&lt;P&gt;data c;&lt;BR /&gt;set b;&lt;BR /&gt;rename col1=ratio col2=lnTEq col3=lnTEn col4=lnTMV col5=lnAMV col6=lnSIZE col7=cash col8=hybrid col9=other col10=shares&lt;BR /&gt;col11=unknown col12=horizental col13=vertical col14=conglomerate col15=year0 col16=year1 col17=year2 col18=year3 col19=year4&lt;BR /&gt;col20=year5 col21=year6 col22=year7 col24=year9 col25=year10 col26=year11 col27=year12 col28=year13 col29=year14;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;proc reg data=c;&lt;BR /&gt;model Acar1 = lnSIZE;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC GLM, PROC GLM, PROC GLM! Stop going through all this effort to create dummy variables.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2015 19:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239235#M43980</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-12-14T19:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239292#M44000</link>
      <description>&lt;P&gt;Dear Paige Miller,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response. So I will not use a PROC REG. But my PROC GLM does not lead to an output page with regression results. I need to run a regression on my dependent variable (ACARs1) and each on&amp;nbsp;my dependent variable and then in the next level on my dependent variable and &amp;nbsp;combinations of my independent&amp;nbsp;variables. Only when I delete the outdesign and outparm and limit the independent variables to one I get the output window with regression results. How can I fix my statements?&lt;/P&gt;
&lt;P&gt;Here is how my statements look like:&lt;/P&gt;
&lt;P&gt;libname ev 'C:\Regression';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;**&lt;FONT color="#99CC00"&gt;*Majority All data set- Regression for Acquirors, CAR (-1, +1), announcment date ********/;&lt;/FONT&gt;&lt;BR /&gt;data final2;&lt;BR /&gt;set ev.final2(keep= tdscd ADSCD Aname Tname AnDate Wdate Acar1 Acar5 Tcar1 Tcar5 TobinQ ADebtratio DEBTRT HOSTATASS AMVal4wp TMVal4wp&lt;BR /&gt; EqValAn EnValAn ConsiStr TNation type AEQW);&lt;BR /&gt;proc sort;&lt;BR /&gt;by adscd andate;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set ev.final2;&lt;/P&gt;
&lt;P&gt;if amval4wp ne 0 and amval4wp ne . then&lt;BR /&gt;ratio=tmval4wp/amval4wp;&lt;/P&gt;
&lt;P&gt;lnTEq=log(EqValAn);&lt;BR /&gt;lnTEn=log(EnValAn);&lt;BR /&gt;lnTMV=log(TMVal4wp);&lt;BR /&gt;lnAMV=log(amval4wp);&lt;BR /&gt;lnSIZE=log(HOSTATASS);&lt;BR /&gt;year = year(Andate);&lt;BR /&gt;Industry= TMaCode;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#99CC00"&gt;/*this does not give me an output window*/&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glmmod data=a outdesign=b outparm=parm ;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = ratio lnTEn lnSIZE ConsiStr type year ADebtratio TobinQ DEBTRT Industry AEQW / noint;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=parm; run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#99CC00"&gt;&lt;SPAN&gt;/*this one&amp;nbsp;gives me an output window*/&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;proc glm data=a ;&lt;BR /&gt;class year;&lt;BR /&gt;model Acar1 = year / noint;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Niloo&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 05:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239292#M44000</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-15T05:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239331#M44014</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&amp;nbsp;But my PROC GLM does not lead to an output page with regression results.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Sure it does. PROC GLM performs a regression on your data. (And you need a QUIT; statement at the end of PROC GLM)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The results are written to the output window (unless you have somehow turned that off).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then you can take all the PROC GLMMOD statements out of your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Dec 2015 13:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239331#M44014</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-12-15T13:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239635#M44110</link>
      <description>&lt;P&gt;Dear PaigeMiller,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your response. I chaned my statements to following and I am trying to export the results into an excel sheet but the ODS statement that I have exports each table to a seperate sheet. how can I have al the results in one sheet and not in table format?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set ev.final2;&lt;/P&gt;
&lt;P&gt;if amval4wp ne 0 and amval4wp ne . then&lt;BR /&gt;ratio=tmval4wp/amval4wp;&lt;/P&gt;
&lt;P&gt;lnTEq=log(EqValAn);&lt;BR /&gt;lnTEn=log(EnValAn);&lt;BR /&gt;lnTMV=log(TMVal4wp);&lt;BR /&gt;lnAMV=log(amval4wp);&lt;BR /&gt;lnSIZE=log(HOSTATASS);&lt;BR /&gt;year = year(Andate);&lt;BR /&gt;Industry= TMaCode;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF6600"&gt;ODS TAGSETS.EXCELXP&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;file='C:\Users\esy\Desktop\niloofar\DePaul Research\M&amp;amp;AJAPAN\Majority\Results\regression.xlsx'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;STYLE=minimal&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;OPTIONS ( Orientation = 'landscape'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;FitToPage = 'yes'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;Pages_FitWidth = '1'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;Pages_FitHeight = '100' );&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = year / noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = ratio / noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = TobinQ/ noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;BR /&gt;&lt;FONT color="#008000"&gt;(I will run the same statment for all my variavles individually, and then for a combination of variables which had meaningful relationships with the dependent variable):&lt;/FONT&gt;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = ADebtratio ratio / noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Niloo&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2015 22:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239635#M44110</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-16T22:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239638#M44111</link>
      <description>Look at the sheet_interval option - the value you're looking for is none. &lt;BR /&gt;&lt;BR /&gt;I don't know what you mean by not in table format.</description>
      <pubDate>Wed, 16 Dec 2015 22:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239638#M44111</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-16T22:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for years</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239639#M44112</link>
      <description>PS. I think your original question has been answered. You should mark this question as answered and start new ones if you have further questions.</description>
      <pubDate>Wed, 16 Dec 2015 22:34:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239639#M44112</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-12-16T22:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239798#M44166</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a question about the dummy variables created by Proc GLM. Variable "type" showes the type of payment (Cash, stock, Hybrid, Unknown) and variable "ConsiStr" discribes the type of deal(horizental, vertical, conglomerate). I need to run a regression on my dependent variable (ACAR1) and "cash" type of payment (not the whole "type" variable) and on ACAR1 and "conglomerate" dales( not the&amp;nbsp;ConsiStr variable itself. But I cannot do it using my current PROC GLM statements. Is there a way I can do this using Proc GLM?&lt;/P&gt;
&lt;P&gt;Here is what I currently have:&lt;/P&gt;
&lt;P&gt;libname ev 'C:\Regression';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data final2;&lt;BR /&gt;set ev.final2(keep= tdscd ADSCD Aname Tname AnDate Wdate Acar1 Acar5 Tcar1 Tcar5 TobinQ ADebtratio DEBTRT HOSTATASS AMVal4wp TMVal4wp&lt;BR /&gt; EqValAn EnValAn ConsiStr TNation type AEQW);&lt;BR /&gt;proc sort;&lt;BR /&gt;by adscd andate;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data a;&lt;BR /&gt;set ev.final2;&lt;/P&gt;
&lt;P&gt;if amval4wp ne 0 and amval4wp ne . then&lt;BR /&gt;ratio=tmval4wp/amval4wp;&lt;/P&gt;
&lt;P&gt;lnTEq=log(EqValAn);&lt;BR /&gt;lnTEn=log(EnValAn);&lt;BR /&gt;lnTMV=log(TMVal4wp);&lt;BR /&gt;lnAMV=log(amval4wp);&lt;BR /&gt;lnSIZE=log(HOSTATASS);&lt;BR /&gt;year = year(Andate);&lt;BR /&gt;Industry= AMaCode;&lt;BR /&gt;run;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = year / noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = Industry / noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = AEQW/ noint;&lt;BR /&gt;QUIT;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#008000"&gt;.... and the rest of the variables&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ODS TAGSETS.EXCELXP&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;file='C:\Users\esy\Desktop\niloofar\DePaul Research\M&amp;amp;AJAPAN\Majority\Results\regression.xls'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;STYLE=minimal&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OPTIONS ( Orientation = 'landscape'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FitToPage = 'yes'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pages_FitWidth = '1'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Pages_FitHeight = '100' sheet_interval='NONE' );&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Niloo&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 17:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239798#M44166</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-17T17:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239814#M44173</link>
      <description>&lt;P&gt;You can restrict your regression analysis to a subset of cases with the &lt;STRONG&gt;where&lt;/STRONG&gt; statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glm data=a;
where type="cash";
class ConsiStr year Industry;
model Acar1 = year / noint;
run;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note: the &lt;STRONG&gt;quit&lt;/STRONG&gt; statement goes after the &lt;STRONG&gt;run&lt;/STRONG&gt; statement.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 18:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239814#M44173</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-17T18:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239818#M44174</link>
      <description>&lt;P&gt;Thanks PG, I tried it but I got this error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;74 proc glm data=a;&lt;BR /&gt;75 where type="cash";&lt;BR /&gt;ERROR: WHERE clause operator requires compatible variables.&lt;BR /&gt;76 class ConsiStr year Industry;&lt;BR /&gt;77 model Acar1 = year / noint;&lt;BR /&gt;78 run;&lt;/P&gt;
&lt;P&gt;WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.&lt;BR /&gt;79 QUIT;&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt; real time 0.02 seconds&lt;BR /&gt; cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Shall I run the PROC GLMMOD before my PROC GLM statements?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 19:13:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239818#M44174</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-17T19:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239827#M44176</link>
      <description>&lt;P&gt;The message "&lt;EM&gt;WHERE clause operator requires compatible variables&lt;/EM&gt;" means that &lt;STRONG&gt;type&lt;/STRONG&gt; must be numeric and "cash" is only the formatted representation of its value. &amp;nbsp;You must either replace "cash" with a number or change the where condition to&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where put(type, yourTypeFormat.) = "cash";
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Dec 2015 19:44:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239827#M44176</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-17T19:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239839#M44181</link>
      <description>&lt;P&gt;Sorry I made a mistake. In my data base "type" is numeric: 1for horizental deals, 2 for vertical and 3 for conglomerate.(so there is no horizental, vertical, conglomerate under type variable only 1 and 2 and3. "ConsiStr" is a character variable: Cash, stock, hybrid, unknown.&lt;/P&gt;
&lt;P&gt;I changed the statements to:&lt;/P&gt;
&lt;P&gt;proc glm data=a;&lt;BR /&gt;where type="3";&lt;BR /&gt;class ConsiStr year Industry;&lt;BR /&gt;model Acar1 = year / noint;&lt;BR /&gt;run;&lt;BR /&gt;QUIT;&lt;BR /&gt;proc glm data=a;&lt;BR /&gt;where put (ConsiStr,$char6.)="cash";&lt;BR /&gt;class ConsiStr type year Industry;&lt;BR /&gt;model Acar1 = ConsiStr / noint;&lt;BR /&gt;run;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;and the error is still:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;46 proc glm data=a;&lt;BR /&gt;147 where type="3";&lt;BR /&gt;ERROR: WHERE clause operator requires compatible variables.&lt;BR /&gt;148 class ConsiStr year Industry;&lt;BR /&gt;149 model Acar1 = year / noint;&lt;BR /&gt;150 run;&lt;/P&gt;
&lt;P&gt;WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.&lt;BR /&gt;151 QUIT;&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt; real time 0.00 seconds&lt;BR /&gt; cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;152 proc glm data=a;&lt;BR /&gt;153 where put (ConsiStr,$char6.)="cash";&lt;BR /&gt;154 class ConsiStr type year Industry;&lt;BR /&gt;155 model Acar1 = ConsiStr / noint;&lt;BR /&gt;156 run;&lt;/P&gt;
&lt;P&gt;NOTE: No observations were selected from data set WORK.A.&lt;BR /&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt; real time 0.00 seconds&lt;BR /&gt; cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;157 QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;thanks,&lt;/P&gt;
&lt;P&gt;Niloo&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 20:34:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239839#M44181</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-17T20:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239854#M44185</link>
      <description>&lt;P&gt;So, I guess the condition should be&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where ConsiStr = "cash";

/* or */

where ConsiStr = "Cash";

/* or, to play safe */

where UPCASE(ConsiStr) = "CASH";

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 17 Dec 2015 21:23:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239854#M44185</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-12-17T21:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dummy variables for year</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239865#M44187</link>
      <description>&lt;P&gt;Thank you soooooo much PG it worked. i used the third one.&lt;/P&gt;
&lt;P&gt;However the type variable still gives me errors:&lt;/P&gt;
&lt;P&gt;proc glm data=a;&lt;BR /&gt;where UPCASE(type)="3";&lt;BR /&gt;class type ConsiStr year Industry;&lt;BR /&gt;model Acar1 = year / noint;&lt;BR /&gt;run;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;error:&lt;/P&gt;
&lt;P&gt;182 proc glm data=a;&lt;BR /&gt;183 where UPCASE(type)="3";&lt;BR /&gt;ERROR: Function UPCASE requires a character expression as argument 1.&lt;BR /&gt;184 class type ConsiStr year Industry;&lt;BR /&gt;185 model Acar1 = year / noint;&lt;BR /&gt;186 run;&lt;/P&gt;
&lt;P&gt;WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.&lt;BR /&gt;187 QUIT;&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE GLM used (Total process time):&lt;BR /&gt; real time 0.00 seconds&lt;BR /&gt; cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2015 21:57:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dummy-variables-for-years/m-p/239865#M44187</guid>
      <dc:creator>niloo</dc:creator>
      <dc:date>2015-12-17T21:57:52Z</dc:date>
    </item>
  </channel>
</rss>

