<?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: KEEP statement issue in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585296#M14299</link>
    <description>&lt;P&gt;If you look toward the bottom I create a series of variables, for some reason it is not keeping the tangibility variable or the debt to assets variable. I get a note&lt;/P&gt;&lt;DIV class="sasNote focus-line"&gt;NOTE: Variable tangibility is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable Dep_to_Assets is uninitialized.&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data temp.compdata; set temp.compdata;&lt;BR /&gt;if indfmt="INDL" &amp;amp; datafmt="STD" &amp;amp; popsrc="D" &amp;amp; consol="C";&lt;BR /&gt;if fyear &amp;gt; 1990 and fyear &amp;lt; 2015;&lt;BR /&gt;if sich &amp;lt;= 4999 and sich &amp;gt;= 4900 then delete;&lt;BR /&gt;if sich &amp;lt;= 6999 and sich &amp;gt;= 6000 then delete;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*Then start building debt and control variables based on the paper - see paper appendix for var defs). You can look&lt;BR /&gt;up variable names on the WRDS web site by accessing the FUNDA file and clicking on the variable definitions tab.*/&lt;/P&gt;&lt;P&gt;/*Create four measures of debt" - first need to define debt and assets*/&lt;BR /&gt;/*book leverage, market leverage, book LTD, market LTD*/&lt;/P&gt;&lt;P&gt;tot_debt = dlc + dltt;&lt;BR /&gt;label tot_debt = "Total_Debt";&lt;/P&gt;&lt;P&gt;tot_assets = at;&lt;BR /&gt;label tot_assets = "Total_Assets";&lt;/P&gt;&lt;P&gt;/* here are my book leverage for total and LT*/&lt;/P&gt;&lt;P&gt;book_lev = tot_debt / tot_assets;&lt;BR /&gt;label book_lev = "Book_Leverage";&lt;/P&gt;&lt;P&gt;LT_book_lev = dltt / tot_assets;&lt;BR /&gt;label lt_book_lev = "LT_Book_Leverage";&lt;/P&gt;&lt;P&gt;/* here are my market calcs, MVA is the denominator instead of total assets*/&lt;/P&gt;&lt;P&gt;mva = (prcc_f * cshpri) + dlc + dltt + pstkl - txditc;&lt;BR /&gt;label mva = 'Mkt Value of Assets';&lt;/P&gt;&lt;P&gt;market_lev = tot_debt / mva;&lt;BR /&gt;label market_lev = "market_Leverage";&lt;/P&gt;&lt;P&gt;LT_market_lev = dltt / mva;&lt;BR /&gt;label lt_market_lev = "LT_Market_Leverage";&lt;/P&gt;&lt;P&gt;/* Now create all the control variables in the paper/*&lt;BR /&gt;/* firm size, market 2 book, profitability, tangibility, depreciation / assets*/&lt;/P&gt;&lt;P&gt;firm_size = .;&lt;BR /&gt;if sale &amp;gt; 0 then firm_size = log(sale);&lt;BR /&gt;label firm_size = 'Firm Size';&lt;/P&gt;&lt;P&gt;market2book = MVA/tot_assets;&lt;BR /&gt;label market2book = "M2B Ratio";&lt;/P&gt;&lt;P&gt;profitability = EBITDA/tot_assets;&lt;BR /&gt;label profitability = "Profitability"&lt;/P&gt;&lt;P&gt;tangibility = PPENT/tot_assets;&lt;BR /&gt;label tangibility = "Tangibility"&lt;/P&gt;&lt;P&gt;/*should XDP be DPC?*/&lt;/P&gt;&lt;P&gt;Dep_to_Assets = XDP/tot_assets;&lt;BR /&gt;label Dep_to_Assets = "Depreciation to Assets"&lt;/P&gt;&lt;P&gt;/* why do I need the RD assets? */&lt;/P&gt;&lt;P&gt;rd_assets=.;&lt;BR /&gt;if xrd ne . then rd_assets = xrd/firm_size;&lt;BR /&gt;label rd_assets = 'R&amp;amp;D/Log Sales';&lt;/P&gt;&lt;P&gt;keep gvkey fyear sich book_lev lt_book_lev market_lev lt_market_lev firm_size market2book profitability tangibility Dep_to_Assets;&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Aug 2019 17:15:03 GMT</pubDate>
    <dc:creator>anweinbe</dc:creator>
    <dc:date>2019-08-30T17:15:03Z</dc:date>
    <item>
      <title>KEEP statement issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585292#M14297</link>
      <description>&lt;P&gt;I opened a table and created 6 new variables from other variables that are in my dataset. When I run my KEEP command, and specify each of the 6 new variables, only 4 of the 6 are being kept. Whats odd, if I change the order of the variable creation that impacts which of the 6 are being kept too!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 16:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585292#M14297</guid>
      <dc:creator>anweinbe</dc:creator>
      <dc:date>2019-08-30T16:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: KEEP statement issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585294#M14298</link>
      <description>&lt;P&gt;Welcome.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show us the code. Copy and paste the code as text into the window that appears when you click on the "running man" icon.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 16:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585294#M14298</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-08-30T16:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: KEEP statement issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585296#M14299</link>
      <description>&lt;P&gt;If you look toward the bottom I create a series of variables, for some reason it is not keeping the tangibility variable or the debt to assets variable. I get a note&lt;/P&gt;&lt;DIV class="sasNote focus-line"&gt;NOTE: Variable tangibility is uninitialized.&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Variable Dep_to_Assets is uninitialized.&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data temp.compdata; set temp.compdata;&lt;BR /&gt;if indfmt="INDL" &amp;amp; datafmt="STD" &amp;amp; popsrc="D" &amp;amp; consol="C";&lt;BR /&gt;if fyear &amp;gt; 1990 and fyear &amp;lt; 2015;&lt;BR /&gt;if sich &amp;lt;= 4999 and sich &amp;gt;= 4900 then delete;&lt;BR /&gt;if sich &amp;lt;= 6999 and sich &amp;gt;= 6000 then delete;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*Then start building debt and control variables based on the paper - see paper appendix for var defs). You can look&lt;BR /&gt;up variable names on the WRDS web site by accessing the FUNDA file and clicking on the variable definitions tab.*/&lt;/P&gt;&lt;P&gt;/*Create four measures of debt" - first need to define debt and assets*/&lt;BR /&gt;/*book leverage, market leverage, book LTD, market LTD*/&lt;/P&gt;&lt;P&gt;tot_debt = dlc + dltt;&lt;BR /&gt;label tot_debt = "Total_Debt";&lt;/P&gt;&lt;P&gt;tot_assets = at;&lt;BR /&gt;label tot_assets = "Total_Assets";&lt;/P&gt;&lt;P&gt;/* here are my book leverage for total and LT*/&lt;/P&gt;&lt;P&gt;book_lev = tot_debt / tot_assets;&lt;BR /&gt;label book_lev = "Book_Leverage";&lt;/P&gt;&lt;P&gt;LT_book_lev = dltt / tot_assets;&lt;BR /&gt;label lt_book_lev = "LT_Book_Leverage";&lt;/P&gt;&lt;P&gt;/* here are my market calcs, MVA is the denominator instead of total assets*/&lt;/P&gt;&lt;P&gt;mva = (prcc_f * cshpri) + dlc + dltt + pstkl - txditc;&lt;BR /&gt;label mva = 'Mkt Value of Assets';&lt;/P&gt;&lt;P&gt;market_lev = tot_debt / mva;&lt;BR /&gt;label market_lev = "market_Leverage";&lt;/P&gt;&lt;P&gt;LT_market_lev = dltt / mva;&lt;BR /&gt;label lt_market_lev = "LT_Market_Leverage";&lt;/P&gt;&lt;P&gt;/* Now create all the control variables in the paper/*&lt;BR /&gt;/* firm size, market 2 book, profitability, tangibility, depreciation / assets*/&lt;/P&gt;&lt;P&gt;firm_size = .;&lt;BR /&gt;if sale &amp;gt; 0 then firm_size = log(sale);&lt;BR /&gt;label firm_size = 'Firm Size';&lt;/P&gt;&lt;P&gt;market2book = MVA/tot_assets;&lt;BR /&gt;label market2book = "M2B Ratio";&lt;/P&gt;&lt;P&gt;profitability = EBITDA/tot_assets;&lt;BR /&gt;label profitability = "Profitability"&lt;/P&gt;&lt;P&gt;tangibility = PPENT/tot_assets;&lt;BR /&gt;label tangibility = "Tangibility"&lt;/P&gt;&lt;P&gt;/*should XDP be DPC?*/&lt;/P&gt;&lt;P&gt;Dep_to_Assets = XDP/tot_assets;&lt;BR /&gt;label Dep_to_Assets = "Depreciation to Assets"&lt;/P&gt;&lt;P&gt;/* why do I need the RD assets? */&lt;/P&gt;&lt;P&gt;rd_assets=.;&lt;BR /&gt;if xrd ne . then rd_assets = xrd/firm_size;&lt;BR /&gt;label rd_assets = 'R&amp;amp;D/Log Sales';&lt;/P&gt;&lt;P&gt;keep gvkey fyear sich book_lev lt_book_lev market_lev lt_market_lev firm_size market2book profitability tangibility Dep_to_Assets;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 17:15:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585296#M14299</guid>
      <dc:creator>anweinbe</dc:creator>
      <dc:date>2019-08-30T17:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: KEEP statement issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585301#M14302</link>
      <description>&lt;P&gt;Examine this section of code and you will find several missing semicolons:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
label profitability = "Profitability" &lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/FONT&gt;

tangibility = PPENT/tot_assets;
label tangibility = "Tangibility" &lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;

/*should XDP be DPC?*/

Dep_to_Assets = XDP/tot_assets;
label Dep_to_Assets = "Depreciation to Assets"&amp;nbsp;&lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Join the club.&amp;nbsp; We've all done that one time or another.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 17:37:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585301#M14302</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-08-30T17:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: KEEP statement issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585302#M14303</link>
      <description>&lt;P&gt;THANK YOU!!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm a student who was assigned a project in this tool. Guess I have to be SUPER careful on colons!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 17:39:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585302#M14303</guid>
      <dc:creator>anweinbe</dc:creator>
      <dc:date>2019-08-30T17:39:14Z</dc:date>
    </item>
    <item>
      <title>Re: KEEP statement issue</title>
      <link>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585348#M14316</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/287480"&gt;@anweinbe&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;THANK YOU!!!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm a student who was assigned a project in this tool. Guess I have to be SUPER careful on colons!&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The Semicolon is the SAS statement ender. All code up to the semicolon is considered a single statement. Often the missing semicolon will generate errors but depending on the actual statements may not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unexpected data results are one possible symptom of missing semicolons. But do read the log as often there will be indications there with odd looking notes or just plain errors.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 20:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/KEEP-statement-issue/m-p/585348#M14316</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-30T20:06:12Z</dc:date>
    </item>
  </channel>
</rss>

