<?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: Scaling for score residual in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97763#M4899</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two comments:&lt;/P&gt;&lt;P&gt;1) The error about W is because of the first error. The ID variable is never assigned because of the first error, so W=X || dbeta || ID&lt;/P&gt;&lt;P&gt;becomes&amp;nbsp; W=X || dbeta, which has a different number of columns than the number of variables that you are specifying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) I was wrong about your definition of the ID variable.&amp;nbsp; I thought you were doing a matrix multiply, but when I look back at your original program I see now that you are doing a series of inner products that result in a vector, not a matrix.&amp;nbsp; I apologize for the confusion. You should restore the original idea:&lt;/P&gt;&lt;P&gt;&amp;nbsp; ld = J(nrow(L), 1, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i = 1 to nrow(L);&lt;/P&gt;&lt;P&gt;&amp;nbsp; ld&lt;I&gt; = L[i,]*t(dbeta[i,]);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your original code, you used 100 instead of nrow(L).&amp;nbsp; Perhaps that was intentional? I don't know how you are using the ID variable, so do what is correct for your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps by fixing the ID variable (which I broke!) your program will work.&amp;nbsp; So sorry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2012 13:22:25 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2012-12-13T13:22:25Z</dc:date>
    <item>
      <title>Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97752#M4888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to generate a residual plot for a weibull survival model based on the code used in "SAS Textbook Examples&lt;BR /&gt;Applied Survival Analysis by Hosmer, Lemeshow and May Chapter 8: Parametric Regression Methods" but I kept getting an error message about the matrices and I have tried all I could be to no avail. The fig84_a file in my own case has 9318 entries and 12 varaiables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would greatly appreciate if someone can take look at it and point out what exactly I need to do to fix it.&lt;/P&gt;&lt;P&gt;Below is my code and and error message received.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*********code******************************/&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;&amp;nbsp; use fig84_a ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; read all variables {lint ltype1 lsupply1 lperiod lru ltype2 luic lttename1 ltraname lspeed lspeed2 lscale} into L;&lt;/P&gt;&lt;P&gt;&amp;nbsp; read all variables {pie_id status time1_cum type1 supply1 period ru type2 uic ttename1 traname speed speed2 mgale} into X;&lt;/P&gt;&lt;P&gt;&amp;nbsp; use covf84;&lt;/P&gt;&lt;P&gt;&amp;nbsp; read all&amp;nbsp; var _num_ into V;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dbeta = L*V;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ld = J(100, 1, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i = 1 to 100;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ld&lt;I&gt; = L[i,]*t(dbeta[i,]);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; W = X || dbeta ||ld;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create fig84_b var {pie_id status time1_cum type1 supply1 period ru type2 uic ttename1 traname speed speed2 mgale dbint dbtype1 dbsupply1 dbperiod dbru dbtype2 dbuic dbttename1 dbtraname dbspeed dbspeed2 dbscale ld};&lt;/P&gt;&lt;P&gt;&amp;nbsp; append from W;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/***********ERROR MESSAGE************************&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;503&amp;nbsp; proc iml;&lt;/P&gt;&lt;P&gt;NOTE: IML Ready&lt;/P&gt;&lt;P&gt;504&amp;nbsp;&amp;nbsp;&amp;nbsp; use fig84_a ;&lt;/P&gt;&lt;P&gt;505&amp;nbsp;&amp;nbsp;&amp;nbsp; read all variables {lint ltype1 lsupply1 lperiod lru ltype2 luic lttename1 ltraname lspeed&lt;/P&gt;&lt;P&gt;505! lspeed2 lscale} into L;&lt;/P&gt;&lt;P&gt;506&amp;nbsp;&amp;nbsp;&amp;nbsp; read all variables {pie_id status time1_cum type1 supply1 period ru type2 uic ttename1&lt;/P&gt;&lt;P&gt;506! traname speed speed2 mgale} into X;&lt;/P&gt;&lt;P&gt;507&amp;nbsp;&amp;nbsp;&amp;nbsp; use covf84;&lt;/P&gt;&lt;P&gt;508&amp;nbsp;&amp;nbsp;&amp;nbsp; read all&amp;nbsp; var _num_ into V;&lt;/P&gt;&lt;P&gt;509&amp;nbsp;&amp;nbsp;&amp;nbsp; dbeta = L*V;&lt;/P&gt;&lt;P&gt;ERROR: (execution) Matrices do not conform to the operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; operation : * at line 509 column 12&lt;/P&gt;&lt;P&gt; operands&amp;nbsp; : L, V&lt;/P&gt;&lt;P&gt;L&amp;nbsp;&amp;nbsp; 9318 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;V&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : ASSIGN at line 509 column 3&lt;/P&gt;&lt;P&gt;510&amp;nbsp;&amp;nbsp;&amp;nbsp; ld = J(100, 1, 0);&lt;/P&gt;&lt;P&gt;511&amp;nbsp;&amp;nbsp;&amp;nbsp; do i = 1 to 100;&lt;/P&gt;&lt;P&gt;512&amp;nbsp;&amp;nbsp;&amp;nbsp; ld&lt;I&gt; = L[i,]*t(dbeta[i,]);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;513&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;ERROR: (execution) Matrix has not been set to a value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; operation : [ at line 512 column 24&lt;/P&gt;&lt;P&gt; operands&amp;nbsp; : dbeta, i,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dbeta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 col&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (type ?, size 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 col&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : ASSIGN at line 512 column 3&lt;/P&gt;&lt;P&gt;514&amp;nbsp;&amp;nbsp;&amp;nbsp; W = X || dbeta ||ld;&lt;/P&gt;&lt;P&gt;ERROR: (execution) Matrices do not conform to the operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; operation : || at line 514 column 9&lt;/P&gt;&lt;P&gt; operands&amp;nbsp; : X, dbeta, ld&lt;/P&gt;&lt;P&gt;X&amp;nbsp;&amp;nbsp; 9318 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 14 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dbeta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 col&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (type ?, size 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ld&amp;nbsp;&amp;nbsp;&amp;nbsp; 100 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 col&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : ASSIGN at line 514 column 3&lt;/P&gt;&lt;P&gt;515&amp;nbsp;&amp;nbsp;&amp;nbsp; create fig84_b var {pie_id status time1_cum type1 supply1 period ru type2 uic ttename1&lt;/P&gt;&lt;P&gt;515! traname speed speed2 mgale dbint dbtype1 dbsupply1 dbperiod dbru dbtype2 dbuic dbttename1&lt;/P&gt;&lt;P&gt;515! dbtraname dbspeed dbspeed2 dbscale ld};&lt;/P&gt;&lt;P&gt;516&amp;nbsp;&amp;nbsp;&amp;nbsp; append from W;&lt;/P&gt;&lt;P&gt;ERROR: Number of columns in W does not match with the number of variables in the data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : APPEND at line 516 column 3&lt;/P&gt;&lt;P&gt;517&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;NOTE: Exiting IML.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.FIG84_B has 0 observations and 27 variables.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE IML used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.06 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.06 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 13:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97752#M4888</guid>
      <dc:creator>Tcook</dc:creator>
      <dc:date>2012-12-12T13:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97753#M4889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first error message says that the operate&lt;/P&gt;&lt;P&gt;dbeta = L*V;&lt;/P&gt;&lt;P&gt;failed because the two matrices are not the right size for matrix multiplication. The rest of the error message gives details:&lt;/P&gt;&lt;P&gt;L&amp;nbsp;&amp;nbsp; 9318 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;V&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In order for L*V to make sense, the number of columns of L (currently 12) needs to be the same as the number of rows of V (currently 24).&lt;/P&gt;&lt;P&gt;I don't know what V stands for, but I'm going to guess it is a matrix of values (covariances? Parameter estimates?) that are related to the variables that you read into L. To fix this, you need to use the subset of entries of V that correspond to the variables in L.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To see what you are reading into V, try this:&lt;/P&gt;&lt;P&gt;read all&amp;nbsp; var _num_ into V[colnames=VNames];&lt;/P&gt;&lt;P&gt;print VNames;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That prints the names of the columns of V.&amp;nbsp; You can then choose only the 12x12 submatrix that corresponds to the variables in L.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 13:25:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97753#M4889</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-12T13:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97754#M4890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did look up the variable in V and they are 24 due the fact that there are categorical levels which where split into a different column, unlike in the L file where they are not. &lt;/P&gt;&lt;P&gt;Should I create dummy variable for the original data instead of invoking the "class statement" in proc lifereg there by creating 24 columns in L as well or is there a way I can specify that some of the variable contains in L are categorical so that SAS can split each into a new col just like in V.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in anticipation of your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NB: We I did the print V, I only saw 1 row and 24 col without any datum, is this a problem or was that the info that it needed to display?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 14:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97754#M4890</guid>
      <dc:creator>Tcook</dc:creator>
      <dc:date>2012-12-12T14:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97755#M4891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LIFEREG uses a GLM parameterization of classification effects. Therefore you can use &lt;A href="http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_glm_sect001.htm"&gt;PROC GLMMOD and the OUTDESIGN= option&lt;/A&gt; to create the dummy variables. Then run LIFEREG on the dummy variables (without any CLASS stmt).&amp;nbsp; That should give you an L matrix that has 24 columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 14:10:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97755#M4891</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-12T14:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97756#M4892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@ Rick, I did as you suggested, but been having the error message below. Been on it for quite some time but no success.&amp;nbsp; I would appreciate your help with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;NOTE: IML Ready&lt;/P&gt;&lt;P&gt;1183&amp;nbsp;&amp;nbsp;&amp;nbsp; use fig84_a ;&lt;/P&gt;&lt;P&gt;1184&amp;nbsp;&amp;nbsp;&amp;nbsp; read all variables {lint ltype11 lsupply11 lsupply12 lperiod1 lperiod2 lperiod3 lperiod4&lt;/P&gt;&lt;P&gt;1184! lru1 ltype21 luic1&lt;/P&gt;&lt;P&gt;1185&amp;nbsp; luic2 luic3 luic4 luic5 luic6 luic7 luic8 lttename11&amp;nbsp; ltraname1 ltraname2 lspeed lspeed2&lt;/P&gt;&lt;P&gt;1185! lscale} into L;&lt;/P&gt;&lt;P&gt;1186&amp;nbsp;&amp;nbsp;&amp;nbsp; read all variables {pie_id status time1_cum type11 type12 supply11 supply12 supply13&lt;/P&gt;&lt;P&gt;1186! period1 period2 period3 period4 period5 ru1 ru2 type21 type22 uic1&lt;/P&gt;&lt;P&gt;1187&amp;nbsp; uic2 uic3 uic4 uic5 uic6 uic7 uic8 uic9 ttename11 ttename12 traname1 traname2 traname3 speed&lt;/P&gt;&lt;P&gt;1187! speed2 mgale} into X;&lt;/P&gt;&lt;P&gt;1188&amp;nbsp;&amp;nbsp;&amp;nbsp; use covf84;&lt;/P&gt;&lt;P&gt;1189&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read all&amp;nbsp; var _num_ into V;&lt;/P&gt;&lt;P&gt;1190&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; H = I(24);&lt;/P&gt;&lt;P&gt;1191&amp;nbsp;&amp;nbsp;&amp;nbsp; H[24,24]=-1/&amp;amp;sigma;&lt;/P&gt;&lt;P&gt;1192&amp;nbsp;&amp;nbsp;&amp;nbsp; V1 = H*V*H;&lt;/P&gt;&lt;P&gt;1193&amp;nbsp;&amp;nbsp;&amp;nbsp; dbeta = L*V;&lt;/P&gt;&lt;P&gt;1194&amp;nbsp;&amp;nbsp;&amp;nbsp; ld = J(7772, 1, 0);&lt;/P&gt;&lt;P&gt;1195&amp;nbsp;&amp;nbsp;&amp;nbsp; do i = 1 to 77720;&lt;/P&gt;&lt;P&gt;1196&amp;nbsp;&amp;nbsp;&amp;nbsp; ld&lt;I&gt; = L[i,]*t(dbeta[i,]);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;1197&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;ERROR: (execution) Invalid subscript or subscript out of range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; operation : [ at line 1196 column 12&lt;/P&gt;&lt;P&gt; operands&amp;nbsp; : L, i,&lt;/P&gt;&lt;P&gt;L&amp;nbsp;&amp;nbsp; 7772 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 row&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 col&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7773&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : ASSIGN at line 1196 column 3&lt;/P&gt;&lt;P&gt;1198&amp;nbsp;&amp;nbsp;&amp;nbsp; W = X || dbeta ||ld;&lt;/P&gt;&lt;P&gt;1199&amp;nbsp;&amp;nbsp;&amp;nbsp; create fig84_b var {pie_id status time1_cum type11 supply11 supply12 period1 period2&lt;/P&gt;&lt;P&gt;1199! period3 period4 ru1 type21 uic1&lt;/P&gt;&lt;P&gt;1200&amp;nbsp; uic2 uic3 uic4 uic5 uic6 uic7 uic8 ttename11 traname1 traname2 speed speed2 mgale dbint&lt;/P&gt;&lt;P&gt;1200! dbtype11 dbsupply11 dbsupply12 dbperiod1 dbperiod2 dbperiod3 dbperiod4 dbru1 dbtype21 dbuic1&lt;/P&gt;&lt;P&gt;1201&amp;nbsp; dbuic2 dbuic3 dbuic4 dbuic5 dbuic6 dbuic7 dbuic8 dbttename11 dbtraname1 dbtraname2 dbspeed&lt;/P&gt;&lt;P&gt;1201! dbspeed2 dbscale ld};&lt;/P&gt;&lt;P&gt;1202&amp;nbsp;&amp;nbsp;&amp;nbsp; append from W;&lt;/P&gt;&lt;P&gt;ERROR: Number of columns in W does not match with the number of variables in the data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : APPEND at line 1202 column 3&lt;/P&gt;&lt;P&gt;1203&amp;nbsp; quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 16:38:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97756#M4892</guid>
      <dc:creator>Tcook</dc:creator>
      <dc:date>2012-12-12T16:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97757#M4893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your DO loop is too long:&lt;/P&gt;&lt;P&gt;do i = 1 to 77720; /* should be nrow(L) */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get rid of the loop entirely (and improve efficiency) by using matrix multiplication:&lt;/P&gt;&lt;P&gt;Id = L*dBeta`;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 16:48:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97757#M4893</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-12T16:48:51Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97758#M4894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;tried it but still no headway &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1266&amp;nbsp; proc iml;&lt;/P&gt;&lt;P&gt;NOTE: IML Ready&lt;/P&gt;&lt;P&gt;1267&amp;nbsp;&amp;nbsp;&amp;nbsp; use fig84_a ;&lt;/P&gt;&lt;P&gt;1268&amp;nbsp;&amp;nbsp;&amp;nbsp; read all variables {lint ltype11 lsupply11 lsupply12 lperiod1 lperiod2 lperiod3 lperiod4&lt;/P&gt;&lt;P&gt;1268! lru1 ltype21 luic1&lt;/P&gt;&lt;P&gt;1269&amp;nbsp; luic2 luic3 luic4 luic5 luic6 luic7 luic8 lttename11&amp;nbsp; ltraname1 ltraname2 lspeed lspeed2&lt;/P&gt;&lt;P&gt;1269! lscale} into L;&lt;/P&gt;&lt;P&gt;1270&amp;nbsp;&amp;nbsp;&amp;nbsp; read all variables {pie_id status time1_cum type11 type12 supply11 supply12 supply13&lt;/P&gt;&lt;P&gt;1270! period1 period2 period3 period4 period5 ru1 ru2 type21 type22 uic1&lt;/P&gt;&lt;P&gt;1271&amp;nbsp; uic2 uic3 uic4 uic5 uic6 uic7 uic8 uic9 ttename11 ttename12 traname1 traname2 traname3 speed&lt;/P&gt;&lt;P&gt;1271! speed2 mgale} into X;&lt;/P&gt;&lt;P&gt;1272&amp;nbsp;&amp;nbsp;&amp;nbsp; use covf84;&lt;/P&gt;&lt;P&gt;1273&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read all&amp;nbsp; var _num_ into V;&lt;/P&gt;&lt;P&gt;1274&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; H = I(24);&lt;/P&gt;&lt;P&gt;1275&amp;nbsp;&amp;nbsp;&amp;nbsp; H[24,24]=-1/&amp;amp;sigma;&lt;/P&gt;&lt;P&gt;1276&amp;nbsp;&amp;nbsp;&amp;nbsp; V1 = H*V*H;&lt;/P&gt;&lt;P&gt;1277&amp;nbsp;&amp;nbsp;&amp;nbsp; dbeta = L*V;&lt;/P&gt;&lt;P&gt;1278&amp;nbsp;&amp;nbsp;&amp;nbsp; ld = L*dBeta;&lt;/P&gt;&lt;P&gt;ERROR: (execution) Matrices do not conform to the operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; operation : * at line 1278 column 9&lt;/P&gt;&lt;P&gt; operands&amp;nbsp; : L, dBeta&lt;/P&gt;&lt;P&gt;L&amp;nbsp;&amp;nbsp; 7772 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;dbeta&amp;nbsp;&amp;nbsp; 7772 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : ASSIGN at line 1278 column 3&lt;/P&gt;&lt;P&gt;1279&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;ERROR: END does not occur within DO group at line=1279 col=3.&lt;/P&gt;&lt;P&gt;1280&amp;nbsp;&amp;nbsp;&amp;nbsp; W = X || dbeta ||ld;&lt;/P&gt;&lt;P&gt;1281&amp;nbsp;&amp;nbsp;&amp;nbsp; create fig84_b var {pie_id status time1_cum type11 supply11 supply12 period1 period2&lt;/P&gt;&lt;P&gt;1281! period3 period4 ru1 type21 uic1&lt;/P&gt;&lt;P&gt;1282&amp;nbsp; uic2 uic3 uic4 uic5 uic6 uic7 uic8 ttename11 traname1 traname2 speed speed2 mgale dbint&lt;/P&gt;&lt;P&gt;1282! dbtype11 dbsupply11 dbsupply12 dbperiod1 dbperiod2 dbperiod3 dbperiod4 dbru1 dbtype21 dbuic1&lt;/P&gt;&lt;P&gt;1283&amp;nbsp; dbuic2 dbuic3 dbuic4 dbuic5 dbuic6 dbuic7 dbuic8 dbttename11 dbtraname1 dbtraname2 dbspeed&lt;/P&gt;&lt;P&gt;1283! dbspeed2 dbscale ld};&lt;/P&gt;&lt;P&gt;1284&amp;nbsp;&amp;nbsp; append from W;&lt;/P&gt;&lt;P&gt;ERROR: Number of columns in W does not match with the number of variables in the data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : APPEND at line 1284 column 2&lt;/P&gt;&lt;P&gt;1285&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;NOTE: Exiting IML.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.FIG84_B has 0 observations and 51 variables.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE IML used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.71 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.15 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 17:04:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97758#M4894</guid>
      <dc:creator>Tcook</dc:creator>
      <dc:date>2012-12-12T17:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97759#M4895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You didn't transpose dBeta. Copy my code EXACTLY and note that there is a transpose operator before the semicolon. The transpose operator (at least on US keyboards) is next to the '1' key and above the TAB key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You seem to be having trouble reading the error messages that tell you why your program is failing. Read this article on &lt;A href="http://blogs.sas.com/content/iml/2010/11/29/how-to-interpret-sasiml-error-messages/" title="http://blogs.sas.com/content/iml/2010/11/29/how-to-interpret-sasiml-error-messages/"&gt; How to interpret SAS/IML error messages - The DO Loop&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 18:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97759#M4895</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-12T18:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97760#M4896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rick for your patience and time.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still trying to find my way round SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the link you suggested, I also did run the code but got two new errors, one has to do with storage space and the order with the dimension of W.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try trouble shooting the dimension of W as well as the space issue but wasn't able.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I supposed I may have to run it on a different system, but if I may ask based on experience do you think the first error may be responsible for the second? If not how do I resolve the second, since, it appears the first is a system problem. Which I guess does not border on SAS programming skill.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the messages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1482&amp;nbsp; proc iml;&lt;/P&gt;&lt;P&gt;NOTE: IML Ready&lt;/P&gt;&lt;P&gt;1483&amp;nbsp;&amp;nbsp;&amp;nbsp; use fig84_a ;&lt;/P&gt;&lt;P&gt;1484&amp;nbsp;&amp;nbsp;&amp;nbsp; read all variables {lint ltype11 lsupply11 lsupply12 lperiod1 lperiod2 lperiod3 lperiod4&lt;/P&gt;&lt;P&gt;1484! lru1 ltype21 luic1&lt;/P&gt;&lt;P&gt;1485&amp;nbsp; luic2 luic3 luic4 luic5 luic6 luic7 luic8 lttename11&amp;nbsp; ltraname1 ltraname2 lspeed lspeed2&lt;/P&gt;&lt;P&gt;1485! lscale} into L;&lt;/P&gt;&lt;P&gt;1486&amp;nbsp;&amp;nbsp;&amp;nbsp; read all variables {pie_id status time1_cum type11 type12 supply11 supply12 supply13&lt;/P&gt;&lt;P&gt;1486! period1 period2 period3 period4 period5 ru1 ru2 type21 type22 uic1&lt;/P&gt;&lt;P&gt;1487&amp;nbsp; uic2 uic3 uic4 uic5 uic6 uic7 uic8 uic9 ttename11 ttename12 traname1 traname2 traname3 speed&lt;/P&gt;&lt;P&gt;1487! speed2 mgale} into X;&lt;/P&gt;&lt;P&gt;1488&amp;nbsp;&amp;nbsp;&amp;nbsp; use covf84;&lt;/P&gt;&lt;P&gt;1489&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read all&amp;nbsp; var _num_ into V;&lt;/P&gt;&lt;P&gt;1490&amp;nbsp;&amp;nbsp;&amp;nbsp; dbeta = L*V;&lt;/P&gt;&lt;P&gt;1491&amp;nbsp;&amp;nbsp;&amp;nbsp; Id = L*dBeta`;&lt;/P&gt;&lt;P&gt;ERROR: (execution) Unable to allocate sufficient memory. At least 483231904 more bytes required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; operation : *` at line 1491 column 9&lt;/P&gt;&lt;P&gt; operands&amp;nbsp; : L, dBeta&lt;/P&gt;&lt;P&gt;L&amp;nbsp;&amp;nbsp; 7772 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;dbeta&amp;nbsp;&amp;nbsp; 7772 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : ASSIGN at line 1491 column 3&lt;/P&gt;&lt;P&gt;1492&amp;nbsp;&amp;nbsp;&amp;nbsp; W = X || dbeta ||ld;&lt;/P&gt;&lt;P&gt;1493&amp;nbsp;&amp;nbsp;&amp;nbsp; create fig84_b var {pie_id status time1_cum type11 type12 supply11 supply12 supply13&lt;/P&gt;&lt;P&gt;1493! period1 period2 period3 period4 period5 ru1 ru2 type21 type22 uic1&lt;/P&gt;&lt;P&gt;1494&amp;nbsp; uic2 uic3 uic4 uic5 uic6 uic7 uic8 uic9 ttename11 ttename12 traname1 traname2 traname3 speed&lt;/P&gt;&lt;P&gt;1494! speed2 mgale dbint dbtype11 dbtype12 dbsupply11 dbsupply12 dbsupply13 dbperiod1 dbperiod2&lt;/P&gt;&lt;P&gt;1494! dbperiod3 dbperiod4 dbperiod5 dbru1 dbru2 dbtype21 dbtype22 dbuic1&lt;/P&gt;&lt;P&gt;1495&amp;nbsp; dbuic2 dbuic3 dbuic4 dbuic5 dbuic6 dbuic7 dbuic8 dbuic9 dbttename11 dbttename12 dbtraname1&lt;/P&gt;&lt;P&gt;1495! dbtraname2 dbtraname3 dbspeed dbspeed2 dbscale ld};&lt;/P&gt;&lt;P&gt;1496&amp;nbsp;&amp;nbsp;&amp;nbsp; append from W;&lt;/P&gt;&lt;P&gt;ERROR: Number of columns in W does not match with the number of variables in the data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : APPEND at line 1496 column 3&lt;/P&gt;&lt;P&gt;1497&amp;nbsp; quit;&lt;/P&gt;&lt;P&gt;NOTE: Exiting IML.&lt;/P&gt;&lt;P&gt;NOTE: The data set WORK.FIG84_B has 0 observations and 67 variables.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE IML used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.10 seconds&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 20:47:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97760#M4896</guid>
      <dc:creator>Tcook</dc:creator>
      <dc:date>2012-12-12T20:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97761#M4897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't understand why you are running out of memory. Your matrices are not very large. Do you have a really old computer without much RAM?&lt;/P&gt;&lt;P&gt;As far as I can tell, your program should use about as much memory as the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt;L = j(7720,24);&lt;/P&gt;&lt;P&gt;X = j(7720,14);&lt;/P&gt;&lt;P&gt;V = j(24,24);&lt;/P&gt;&lt;P&gt;dbeta = L*V;&lt;/P&gt;&lt;P&gt;Id = L*dbeta`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try running that code and see if you still get an error. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To reclaim memory, you can close the two open data sets:&lt;/P&gt;&lt;P&gt;close&amp;nbsp; fig84_a;&lt;/P&gt;&lt;P&gt;close covf_84;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's more ways to save memory. You don't use X at all, so don't even read it. Just write dBeta and Id to separate data sets (of the same names) and then use a DATA step to merge:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Fig84_b;&lt;/P&gt;&lt;P&gt;merge Fig84_a dBeta Id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 21:05:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97761#M4897</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-12T21:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97762#M4898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yeah, my RAM size is small.&amp;nbsp; But for now my major problem is the appending W, the last error. I will fix the one with storage by using a different system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1602&amp;nbsp;&amp;nbsp;&amp;nbsp; use covf84;&lt;/P&gt;&lt;P&gt;1603&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; read all&amp;nbsp; var _num_ into V;&lt;/P&gt;&lt;P&gt;1604&amp;nbsp; L = j(7720,24);&lt;/P&gt;&lt;P&gt;1605&amp;nbsp; X = j(7720,14);&lt;/P&gt;&lt;P&gt;1606&amp;nbsp; V = j(24,24);&lt;/P&gt;&lt;P&gt;1607&amp;nbsp; dbeta = L*V;&lt;/P&gt;&lt;P&gt;1608&amp;nbsp; Id = L*dbeta`;&lt;/P&gt;&lt;P&gt;ERROR: (execution) Unable to allocate sufficient memory. At least 476787232 more bytes required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; operation : *` at line 1608 column 7&lt;/P&gt;&lt;P&gt; operands&amp;nbsp; : L, dbeta&lt;/P&gt;&lt;P&gt;L&amp;nbsp;&amp;nbsp; 7720 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;dbeta&amp;nbsp;&amp;nbsp; 7720 rows&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24 cols&amp;nbsp;&amp;nbsp;&amp;nbsp; (numeric)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; statement : ASSIGN at line 1608 column 1&lt;/P&gt;&lt;P&gt;1609&amp;nbsp; W = X || dbeta ||ld;&lt;/P&gt;&lt;P&gt;1610&amp;nbsp;&amp;nbsp;&amp;nbsp; create fig84_b var {pie_id status time1_cum type1 supply1 period ru type2 uic ttename1&lt;/P&gt;&lt;P&gt;1610! traname speed speed2 mgale dbint dbtype1 dbsupply1 dbperiod dbru dbtype2 dbuic dbttename1&lt;/P&gt;&lt;P&gt;1610! dbtraname dbspeed dbspeed2 dbscale ld};&lt;/P&gt;&lt;P&gt;1611&amp;nbsp;&amp;nbsp;&amp;nbsp; append from W;&lt;/P&gt;&lt;P&gt;ERROR: Number of columns in W does not match with the number of variables in the data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2012 22:16:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97762#M4898</guid>
      <dc:creator>Tcook</dc:creator>
      <dc:date>2012-12-12T22:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97763#M4899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Two comments:&lt;/P&gt;&lt;P&gt;1) The error about W is because of the first error. The ID variable is never assigned because of the first error, so W=X || dbeta || ID&lt;/P&gt;&lt;P&gt;becomes&amp;nbsp; W=X || dbeta, which has a different number of columns than the number of variables that you are specifying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) I was wrong about your definition of the ID variable.&amp;nbsp; I thought you were doing a matrix multiply, but when I look back at your original program I see now that you are doing a series of inner products that result in a vector, not a matrix.&amp;nbsp; I apologize for the confusion. You should restore the original idea:&lt;/P&gt;&lt;P&gt;&amp;nbsp; ld = J(nrow(L), 1, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp; do i = 1 to nrow(L);&lt;/P&gt;&lt;P&gt;&amp;nbsp; ld&lt;I&gt; = L[i,]*t(dbeta[i,]);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your original code, you used 100 instead of nrow(L).&amp;nbsp; Perhaps that was intentional? I don't know how you are using the ID variable, so do what is correct for your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Perhaps by fixing the ID variable (which I broke!) your program will work.&amp;nbsp; So sorry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 13:22:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97763#M4899</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-13T13:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97764#M4900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remember the rules for matrix multiplication.&amp;nbsp; Not only does the number of rows in the second matrix have to equal the number of columns in the first matrix, but the number of rows in the resulting "product" matrix, Id, equals the number of rows in the first matrix, and the number of columns in this "product" matrix equals the number of columns in the second matrix.&amp;nbsp; In your example, the first matrix, L, has 7,720 rows and 24 columns; the second matrix, dbeta, also has 7,720 rows and 24 columns.&amp;nbsp; When dbeta is transposed, however, dbeta` has 24 rows and 7,720 columns.&amp;nbsp; When you multiply L times the transposed dbeta (dbeta'), the resulting product matrix, Id=L*dbeta`, has 7,720 rows and 7,720 columns, which is too large for your computer to handle and perhaps too large for you to interpret (about 60,000,000 entries).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More plausibly, the size of your final product matrix would be 24*24 = 576 entries.&amp;nbsp; To obtain a matrix of this size, you would have to transpose the original first matrix, L, to L` with dimensions of 24 rows and 7,720 columns, and multiply this transposed matrix by the original second matrix, dbeta, with 7,720 rows and 24 columns.&amp;nbsp; Now, the new "product" matrix, Id2=L`*dbeta, has dimensions of 24 rows and 24 columns, which your computer should have no problem handling.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.:&amp;nbsp; I put the term, "product", in the phrase, "product" matrix, in double quotes above to distinguish the matrix that results from the&amp;nbsp; multiplication of two conformable matrices (as here) from the matrix known as the direct (or Kroenecker) product matrix. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 13:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97764#M4900</guid>
      <dc:creator>1zmm</dc:creator>
      <dc:date>2012-12-13T13:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97765#M4901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rick/1Zmm;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried both methods and resolved the problem with the "memory" warning but I got a different error message:&lt;/P&gt;&lt;P&gt;ERROR: Number of columns in W does not match with the number of variables in the data set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;been trying to resolve but was unable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First how can I call up the columns of the matrix W. so as to see what exactly the columns are, this will help me to know the columns that shouldn't be. Unless there is another way round it that you could suggest?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 12:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97765#M4901</guid>
      <dc:creator>Tcook</dc:creator>
      <dc:date>2012-12-19T12:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97766#M4902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the NCOL and NROW functions to determine the number of columns and rows, respectively of a matrix.&lt;/P&gt;&lt;P&gt;I also suggest that you download the free chapter "Getting Started with the SAS/IML Matrix Programming Language" from my book &lt;EM&gt;Statistical Programming with SAS/IML Software. &lt;/EM&gt;It is available at &lt;A href="http://support.sas.com/publishing/authors/wicklin.html" title="http://support.sas.com/publishing/authors/wicklin.html"&gt;SAS Press - Rick Wicklin Author Page&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 15:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97766#M4902</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2012-12-19T15:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Scaling for score residual</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97767#M4903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Rick/1Zmm,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 20:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Scaling-for-score-residual/m-p/97767#M4903</guid>
      <dc:creator>Tcook</dc:creator>
      <dc:date>2012-12-19T20:40:17Z</dc:date>
    </item>
  </channel>
</rss>

