<?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: data manipulation question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/data-manipulation-question/m-p/102756#M21449</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you want to use PROC TRANSPOSE, with the ID statement, something like (untested)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC TRANSPOSE DATA=whatever OUT=transpose;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var stderr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; id parameter;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Aug 2013 16:59:03 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2013-08-06T16:59:03Z</dc:date>
    <item>
      <title>data manipulation question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-manipulation-question/m-p/102755#M21448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From the parameter output of Proc Model ("Nonlinear OLS Parameter Estimates") I am obtaining the Standard Errors of each of my parameter estimates to append to another file of all my parameter data. Basically the data I get from the ods output is formatted as such:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Parameter&lt;/TD&gt;&lt;TD&gt;StdErr&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A1&lt;/TD&gt;&lt;TD&gt;0.9174&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B1&lt;/TD&gt;&lt;TD&gt;0.2323&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B2&lt;/TD&gt;&lt;TD&gt;0.2418&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B3&lt;/TD&gt;&lt;TD&gt;0.0778&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;gamma&lt;/TD&gt;&lt;TD&gt;0.0145&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to manipulate this data to a one row data-set as such:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="362"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="67"&gt;StdErr_A1&lt;/TD&gt;&lt;TD width="66"&gt;StdErr_B1&lt;/TD&gt;&lt;TD width="66"&gt;StdErr_B2&lt;/TD&gt;&lt;TD width="66"&gt;StdErr_B3&lt;/TD&gt;&lt;TD width="97"&gt;StdErr_gamma&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;0.9174&lt;/TD&gt;&lt;TD align="right"&gt;0.2323&lt;/TD&gt;&lt;TD align="right"&gt;0.2418&lt;/TD&gt;&lt;TD align="right"&gt;0.0778&lt;/TD&gt;&lt;TD align="right"&gt;&lt;P&gt;0.0145&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been trying to do this by storing the parameter I'm currently on in a datastep to a macro variable that can I use to concatenate a variable name and assign the StdErr to, as such:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data stderr_out2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set stderr_out;&lt;/P&gt;&lt;P&gt;&amp;nbsp; call symputx("parm", parameter);&lt;/P&gt;&lt;P&gt;&amp;nbsp; stderr_&amp;amp;parm. = StdErr;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This won't give me the desired end-result yet, but I will at least have the correct variable names with their respective values and I can get to this final result with another datastep. However, this is not working at all, I only get one column added that corresponds to the last parameter, i.e. I will get this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 273px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="20" width="72"&gt;&lt;/TD&gt;&lt;TD width="84"&gt;&lt;/TD&gt;&lt;TD width="117"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;Parameter&lt;/TD&gt;&lt;TD align="right"&gt;StdErr&lt;/TD&gt;&lt;TD align="right"&gt;stderr_gamma&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;A1&lt;/TD&gt;&lt;TD align="right"&gt;0.917366246&lt;/TD&gt;&lt;TD align="right"&gt;0.917366246&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;B1&lt;/TD&gt;&lt;TD align="right"&gt;0.232323077&lt;/TD&gt;&lt;TD align="right"&gt;0.232323077&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;B2&lt;/TD&gt;&lt;TD align="right"&gt;0.241839023&lt;/TD&gt;&lt;TD align="right"&gt;0.241839023&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;B3&lt;/TD&gt;&lt;TD align="right"&gt;0.077813946&lt;/TD&gt;&lt;TD align="right"&gt;0.077813946&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20"&gt;gamma&lt;/TD&gt;&lt;TD align="right"&gt;0.014471111&lt;/TD&gt;&lt;TD align="right"&gt;0.014471111&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than a new column for each parameter, only the column from the last macro is placed in the data set. Am I going about this a completely incorrect way? This seems like it should be fairly simple to do and I've gotten somewhat stumped as to what is going on here. Please if you have any suggestions I would appreciate it a great deal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!&lt;/P&gt;&lt;P&gt;-Ryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 16:56:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-manipulation-question/m-p/102755#M21448</guid>
      <dc:creator>AllSoEasy</dc:creator>
      <dc:date>2013-08-06T16:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: data manipulation question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-manipulation-question/m-p/102756#M21449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you want to use PROC TRANSPOSE, with the ID statement, something like (untested)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROC TRANSPOSE DATA=whatever OUT=transpose;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var stderr;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; id parameter;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 16:59:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-manipulation-question/m-p/102756#M21449</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2013-08-06T16:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: data manipulation question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-manipulation-question/m-p/102757#M21450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I feel really silly that it was that easy!! I don't know why I didn't think of using proc transpose with the ID statement for this. Thank you for the quick answer!!&lt;/P&gt;&lt;P&gt;-Ryan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 17:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-manipulation-question/m-p/102757#M21450</guid>
      <dc:creator>AllSoEasy</dc:creator>
      <dc:date>2013-08-06T17:02:07Z</dc:date>
    </item>
  </channel>
</rss>

