<?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: GLM in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255949#M13511</link>
    <description>&lt;P&gt;Well, technically it is a hypersurface, not a line.&amp;nbsp; Like trying to fit a plane to a data set that has only one or two points.&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2016 21:47:56 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-03-10T21:47:56Z</dc:date>
    <item>
      <title>GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255314#M13466</link>
      <description>Hi, I would like to create a model by using input x which is a matrix and output y which is a vector. I saw several examples for GLM but using input variables x1 ,x2,.. so on. But I have one variable x which is a matrix. Many thanks.</description>
      <pubDate>Tue, 08 Mar 2016 18:10:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255314#M13466</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-08T18:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255330#M13468</link>
      <description>&lt;P&gt;If you have matrix, you may want to look at IML.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise, post a sample of what your data looks like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unless your matrix is Nx1, it's likely your data structure will support GLM. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 19:08:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255330#M13468</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-08T19:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255340#M13471</link>
      <description>&lt;P&gt;Could you describe your data further? How does the matrix enter into the model?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2016 19:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255340#M13471</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-03-08T19:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255358#M13473</link>
      <description>I have 55 input variables in the data and 20 samples. so its 20*55. and y is a 1*55 matrix. so it is a vector. Many thanks for helping.</description>
      <pubDate>Tue, 08 Mar 2016 20:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255358#M13473</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-08T20:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255359#M13474</link>
      <description>I am so sorry y is a 1*20 matrix.</description>
      <pubDate>Tue, 08 Mar 2016 20:40:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255359#M13474</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-08T20:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255402#M13478</link>
      <description>&lt;P&gt;Here is an example .&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/iml/2016/03/02/dummy-variables-sasiml.html" target="_blank"&gt;http://blogs.sas.com/content/iml/2016/03/02/dummy-variables-sasiml.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Especial this part:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Y = Cholesterol;                 /* response variable */
Intercept = j(nrow(Y), 1, 1);
X1 = designf( Sex );
X2 = designf( BP_Status );
X = Intercept || X1 || X2;      /* design matrix with EFFECT parameterization */
 
/* Matrix formulation of one-way ANOVA (cell means model): Y = X*beta + epsilon
   See https://en.wikipedia.org/wiki/Design_matrix       */
b = solve( X`*X, X`*Y );       /* solve normal equations */
print b[rowname={"Intercept" "Sex:Female" "BP_Status:High" "BP_Status:Normal"}];
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Mar 2016 01:19:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255402#M13478</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-03-09T01:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255412#M13482</link>
      <description>&lt;P&gt;Are your matrices SAS data sets - .sas7bdat files?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Mar 2016 02:28:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255412#M13482</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-09T02:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255722#M13496</link>
      <description>&lt;P&gt;No. It is a csv file.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 04:11:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255722#M13496</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-10T04:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255725#M13497</link>
      <description>&lt;P&gt;Please post a sample of your data. I think you can use proc glm.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 04:27:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255725#M13497</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-10T04:27:07Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255728#M13498</link>
      <description>&lt;P&gt;Many thanks for your response. I looked at the example that you provided. Hopefuly it would work.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 04:43:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255728#M13498</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-10T04:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255766#M13499</link>
      <description>&lt;P&gt;I attached the data. There are 20 samples and 55 variables in the data. here is the output: Many thanks.&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;8.14&lt;/TD&gt;&lt;TD&gt;5.77&lt;/TD&gt;&lt;TD&gt;5.89&lt;/TD&gt;&lt;TD&gt;4.78&lt;/TD&gt;&lt;TD&gt;4.48&lt;/TD&gt;&lt;TD&gt;3.96&lt;/TD&gt;&lt;TD&gt;5.1&lt;/TD&gt;&lt;TD&gt;5.57&lt;/TD&gt;&lt;TD&gt;5.27&lt;/TD&gt;&lt;TD&gt;4.2&lt;/TD&gt;&lt;TD&gt;5.23&lt;/TD&gt;&lt;TD&gt;2.94&lt;/TD&gt;&lt;TD&gt;4.77&lt;/TD&gt;&lt;TD&gt;4.67&lt;/TD&gt;&lt;TD&gt;4.8&lt;/TD&gt;&lt;TD&gt;5.21&lt;/TD&gt;&lt;TD&gt;5.28&lt;/TD&gt;&lt;TD&gt;3.91&lt;/TD&gt;&lt;TD&gt;4.21&lt;/TD&gt;&lt;TD&gt;5.17&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 10 Mar 2016 12:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255766#M13499</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-10T12:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255809#M13500</link>
      <description>&lt;P&gt;This is how the code could look, if you wanted a simple GLM model:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*import dataset into SAS;
data have;
infile 'C:\_localdata\data.csv' dlm="," dsd truncover lrecl=1000;
informat var1-var40 best32.;
format var1-var40 best32.;
input var1-var40;
run;

*Run model;
proc glm data=have;
	model var1 = var2--var40;
run;quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2016 15:43:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255809#M13500</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-10T15:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255871#M13502</link>
      <description>&lt;P&gt;Many thanks for your response. I have some questions for you. Where is the output variable 'y'. Also why did you take 40 variables is there a specific reason for that?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 17:47:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255871#M13502</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-10T17:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255877#M13503</link>
      <description>&lt;P&gt;Your file had 40 variables, it was a demo of how it could be accomplished.&lt;/P&gt;
&lt;P&gt;It had no headers so I don't know which is y, which is x etc.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I simply took the first variable as the Y and the remaining as X to demonstrate the GLM procedure.&lt;/P&gt;
&lt;P&gt;To develop a final model you might want to use a selection method to subset the variables. PROC GLMSELECT is helpful here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please consider my code a sample, not what you should do. You should know what your variables are and how they should be handled. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 18:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255877#M13503</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-10T18:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255879#M13504</link>
      <description>&lt;P&gt;Many thanks for your response I understood you mean.&lt;/P&gt;&lt;P&gt;My bad. Mistakengly I put 55*40 input. It should be 55*20 but I see you mean. The 40 is the sample number. I do have 55 variables so is the following right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;glm&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;have&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
	&lt;SPAN class="token procnames"&gt;model&lt;/SPAN&gt; y &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; var1&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;-&lt;/SPAN&gt;var55&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;SPAN class="token procnames"&gt;quit&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I don't now what GLMSLECT is doing at the final stage. I will research for it. Many thanks for your responses.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 18:17:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255879#M13504</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-10T18:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255882#M13505</link>
      <description>&lt;P&gt;You had 55 observations, not variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The columns are variables not rows&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, your code looks correct, assuming that matches your data structure.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 18:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255882#M13505</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-10T18:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255920#M13507</link>
      <description>&lt;P&gt;Thank you so much so I need to transpoze my data in order to make right model. Many thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 20:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255920#M13507</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-10T20:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255922#M13508</link>
      <description>&lt;P&gt;I have got the model but it produces very impossible results. R Square equals to 1. and F equals to infinitive:((&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 20:26:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255922#M13508</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-10T20:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255931#M13509</link>
      <description>&lt;P&gt;Since no one else has mentioned it....&lt;/P&gt;
&lt;P&gt;With 55 variables and only 40 observations, you have an overspecified system.&amp;nbsp; There are enough parameters to fit the data exactly, which is why you are seeing R-square=1.&amp;nbsp; However, the model is meaningless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An analagous example is asking for the "line of best fit" through one data point.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 20:45:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255931#M13509</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-03-10T20:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: GLM</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255941#M13510</link>
      <description>&lt;P&gt;Many thanks. so you mean like finding a hyperline, right?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2016 21:24:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/GLM/m-p/255941#M13510</guid>
      <dc:creator>FREDY_07</dc:creator>
      <dc:date>2016-03-10T21:24:51Z</dc:date>
    </item>
  </channel>
</rss>

