<?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: Reading an external file (excel) file into SAS-IML to create a matrix in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Reading-an-external-file-excel-file-into-SAS-IML-to-create-a/m-p/95529#M723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SAS/IML comes with an interface: SAS/IML Studio. It implements IMLPlus, an enhanced version of the SAS/IML programming language.&lt;/P&gt;&lt;P&gt;In IMLPlus, you could use the DataObject.CreateFromExcelFile method in a program to read your MS Excel worksheet into SAS/IML Studio. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Otherwise, if you have the SAS/Access to PC Files module, you can use Proc IMPORT to import your MS Excel worksheet into a SAS dataset.&lt;/P&gt;&lt;P&gt;After, in SAS/IML, you can leverage the USE statement to open the dataset and make it current for input, then the READ statement to transfer the data from the dataset to a matrix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once in a matrix, you can manipulate the elements as you see fit.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Cheers!&lt;/P&gt;&lt;P&gt;Sylvain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Feb 2013 18:39:27 GMT</pubDate>
    <dc:creator>SylvainTremblay</dc:creator>
    <dc:date>2013-02-12T18:39:27Z</dc:date>
    <item>
      <title>Reading an external file (excel) file into SAS-IML to create a matrix</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reading-an-external-file-excel-file-into-SAS-IML-to-create-a/m-p/95528#M722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a data set with more than 100 observations and contains three variables, var(x1), var(x2), and cov(x1, x2) in an excel file. How do I read this data set into SAS or SAS-IML to create a 2X2 matrix&amp;nbsp; with the variances on the diagonal and covariance off diagonal? I'm new to SAS and SAS-IML, and so, does anyone know of a "do-loop" to read these data into a matrix. Any help will be appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rommel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Feb 2013 19:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reading-an-external-file-excel-file-into-SAS-IML-to-create-a/m-p/95528#M722</guid>
      <dc:creator>dessert_fox</dc:creator>
      <dc:date>2013-02-02T19:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reading an external file (excel) file into SAS-IML to create a matrix</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reading-an-external-file-excel-file-into-SAS-IML-to-create-a/m-p/95529#M723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SAS/IML comes with an interface: SAS/IML Studio. It implements IMLPlus, an enhanced version of the SAS/IML programming language.&lt;/P&gt;&lt;P&gt;In IMLPlus, you could use the DataObject.CreateFromExcelFile method in a program to read your MS Excel worksheet into SAS/IML Studio. &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Otherwise, if you have the SAS/Access to PC Files module, you can use Proc IMPORT to import your MS Excel worksheet into a SAS dataset.&lt;/P&gt;&lt;P&gt;After, in SAS/IML, you can leverage the USE statement to open the dataset and make it current for input, then the READ statement to transfer the data from the dataset to a matrix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once in a matrix, you can manipulate the elements as you see fit.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Cheers!&lt;/P&gt;&lt;P&gt;Sylvain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 18:39:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reading-an-external-file-excel-file-into-SAS-IML-to-create-a/m-p/95529#M723</guid>
      <dc:creator>SylvainTremblay</dc:creator>
      <dc:date>2013-02-12T18:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reading an external file (excel) file into SAS-IML to create a matrix</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Reading-an-external-file-excel-file-into-SAS-IML-to-create-a/m-p/95530#M724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sir Sylvain! Sorry if I had to ask you a more specific question related to the question I earlier asked. This is what my problem is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm meta-analyzing effect sizes from more than 100 studies. Some studies have one effect size, or 2 effect sizes, or 3 effect sizes, and etc.&lt;/P&gt;&lt;P&gt;Because studies have different number of effect sizes, the covariance matrices of effect sizes are then different for each study.&lt;/P&gt;&lt;P&gt;To illustrate, I have small data set below (where Study 1 has 2 effect sizes, thus it has a 2X2 covariance matrix; Study has 3 effect sizes, thus&lt;/P&gt;&lt;P&gt;it has a 3X3 covariance matrix; and Study 1 (has 2 missing effect sizes) so it has only 1X1 covariance matrix). So here is my question Sir,&lt;/P&gt;&lt;P&gt;is there a code I can use to (automate) import the covariance matrix from say SAS to SAS-IML without having to type this covariance matrices&lt;/P&gt;&lt;P&gt;into SAS-IML, given the fact that I have more than 100 studies?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Study 1 = { .022 .009,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .009 .023}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Study 2 = { .016 .003 .006,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .003 .016 .008&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .006 .008 .016}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Study = { .019}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks so much for the help. I'm new with SAS and SAS IML and I really need to figure out&lt;/P&gt;&lt;P&gt;how I can import my data (covariance matrices) in order for me to run an analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;Rommel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2013 22:59:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Reading-an-external-file-excel-file-into-SAS-IML-to-create-a/m-p/95530#M724</guid>
      <dc:creator>dessert_fox</dc:creator>
      <dc:date>2013-02-19T22:59:46Z</dc:date>
    </item>
  </channel>
</rss>

