<?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: How to Reg on each row?! with Slope/Intercept saved out?! in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982732#M49181</link>
    <description>&lt;P&gt;**EDIT** I may have completely misunderstood your question.&amp;nbsp; Can you describe your data, and show the regression you want to run?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the values &lt;SPAN&gt;[100 80 60 40 30 20 10 5]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;?&amp;nbsp; Are they counts? or Times?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regardless, you should transpose your data to be vertical.&amp;nbsp; It would have three columns, X Y Group.&amp;nbsp; Where group is&amp;nbsp;[100 80 60 40 30 20 10 5].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then you could run PROC REG or whatever with a BY statement for group.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rather than post a SAS dataset, it would be more helpful to post sample data a DATA step using the CARDS statement.&amp;nbsp; You should also post the code you have tried, that will help people help you.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jan 2026 15:24:03 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2026-01-30T15:24:03Z</dc:date>
    <item>
      <title>How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982731#M49180</link>
      <description>&lt;P&gt;I have,FOR EACH ROW, Y-values as columns and X-Values are the numeric[100 80 60 40 30 20 10 5] at the column names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to run PROC REG and save out the SLOPE and INTERCEPT for each?! Thanks.&lt;/P&gt;
&lt;P&gt;Dataset attached below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sc.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/112897iAC293DD32B78B711/image-size/large?v=v2&amp;amp;px=999" role="button" title="sc.jpg" alt="sc.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 15:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982731#M49180</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2026-01-30T15:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982732#M49181</link>
      <description>&lt;P&gt;**EDIT** I may have completely misunderstood your question.&amp;nbsp; Can you describe your data, and show the regression you want to run?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are the values &lt;SPAN&gt;[100 80 60 40 30 20 10 5]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;?&amp;nbsp; Are they counts? or Times?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regardless, you should transpose your data to be vertical.&amp;nbsp; It would have three columns, X Y Group.&amp;nbsp; Where group is&amp;nbsp;[100 80 60 40 30 20 10 5].&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then you could run PROC REG or whatever with a BY statement for group.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Rather than post a SAS dataset, it would be more helpful to post sample data a DATA step using the CARDS statement.&amp;nbsp; You should also post the code you have tried, that will help people help you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 15:24:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982732#M49181</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2026-01-30T15:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982733#M49182</link>
      <description>&lt;P&gt;Transpose the data set and then remove the _100 _80 etc. into a numeric variable. That's the only way.&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;already showed you how to do this here:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982304#M379298" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/SAS-Programming/How-to-line-plot-all-info-without-transpose/m-p/982304#M379298&lt;/A&gt;&amp;nbsp;In fact, the data set created in that thread should be usable in the regression problem.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Repeating what I said in that thread:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"Best practice is to NOT arrange the data like this in the first place. Specifically, you have incorporated some meaningful data that the plot needs in the variable name — in this case, specifically, the data in the variable name is the _100 and _80 and so on. Data belongs in variable values, not in the variable name."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 15:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982733#M49182</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2026-01-30T15:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982738#M49183</link>
      <description>&lt;P&gt;x=[100 80 60 40 30 20 10 5] always&lt;/P&gt;
&lt;P&gt;Y=[453 459 466 472 480 482 486 486] for the first row ... and so on&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 15:47:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982738#M49183</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2026-01-30T15:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982740#M49184</link>
      <description>&lt;P&gt;Agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;, use the same transpose approach provided in the other thread.&amp;nbsp; Then you can run your regression like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc reg data=have;
  model y=x;
  by xahead;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With statements added to output the parameters you want.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 15:54:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982740#M49184</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2026-01-30T15:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982746#M49185</link>
      <description>&lt;P&gt;See if the following program does what you wanted --&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-main"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-main"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV class="forum-topic-flex-article"&gt;
&lt;DIV class="forum-article"&gt;
&lt;DIV class="forum-post"&gt;
&lt;DIV id="bodyDisplay_45f95e94d6b2a" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;&lt;LI-CODE lang="sas"&gt;libname jt 'c:\temp';

proc transpose data=jt._reg_by_row out=new(rename=(col1=y));
  by xahead;
 run;

data new;
    set new;
	x = input(compress(_name_,"off_min_ct_"),best.);
	drop _name_;
run;

proc reg data=new;
  by xahead;
  model y=x;
run;
quit;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps,&lt;/P&gt;
&lt;P&gt;Jill&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="lia-quilt-row lia-quilt-row-footer"&gt;
&lt;DIV class="lia-quilt-column lia-quilt-column-24 lia-quilt-column-single lia-quilt-column-message-footer"&gt;
&lt;DIV class="lia-quilt-column-alley lia-quilt-column-alley-single"&gt;
&lt;DIV class="message-actions-shelf"&gt;
&lt;DIV class="message-extra"&gt;
&lt;DIV class="AddMessageTags lia-message-tags lia-component-message-view-widget-tags"&gt;&lt;A id="showAddTag_45f95e9601bbd" class="lia-link-navigation add-tag-link" tabindex="0" role="button" href="https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982731/emcs_t/S2h8ZW1haWx8Ym9hcmRfc3Vic2NyaXB0aW9ufE1MMTBXR0xYR04xVlZCfDk4MjczMXxTVUJTQ1JJUFRJT05TfGhL#" aria-label="Add Tag..." target="_blank"&gt;Add tags&lt;/A&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="message-actions"&gt;
&lt;DIV id="kudosButtonV2_45f95e99061c4" class="KudosButton lia-button-image-kudos-wrapper lia-component-kudos-widget-button-version-3 lia-component-kudos-widget-button-horizontal lia-component-kudos-widget-button lia-component-kudos-action lia-component-message-view-widget-kudos-action" data-lia-kudos-id="982740"&gt;
&lt;DIV class="lia-button-image-kudos lia-button-image-kudos-horizontal lia-button-image-kudos-enabled lia-button-image-kudos-not-kudoed lia-button"&gt;
&lt;DIV class="lia-button-image-kudos-count"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="lia-button-image-kudos-give"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="accept"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="reply"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 30 Jan 2026 16:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982746#M49185</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2026-01-30T16:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982766#M49186</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409584"&gt;@hellohere&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How to run PROC REG and save out the SLOPE and INTERCEPT for each?! Thanks.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If slope and intercept is all you would need from PROC REG, you can also compute them in a DATA step:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(drop=i _:);
array x[8] (100 80 60 40 30 20 10 5);
set _reg_by_row;
array y[8] o:;
_x=mean(of x[*]);
_y=mean(of y[*]);
_s=0;
do i=1 to dim(x);
  _s+(x[i]-_x)*(y[i]-_y);
end;
slope=_s/css(of x[*]);
intercept=_y-slope*_x;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But this is neither much shorter nor safer than relying on PROC REG after transposing.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 21:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982766#M49186</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2026-01-30T21:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982771#M49187</link>
      <description>&lt;P&gt;Transpose the data and run regression by the id variable, which looks like it is named XAHEAD.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x=100 80 60 40 30 20 10 5;
%let vars=eff_min_ct_%sysfunc(tranwrd(&amp;amp;x,%str( ),%str( eff_min_ct_)));

data tall;
  set have;
  array _x[%sysfunc(countw(&amp;amp;x))] _temporary_ (&amp;amp;x);
  array _y &amp;amp;vars;
  do over _x;
    x=_x;
    y=_y;
    output;
  end;
  drop &amp;amp;vars;
run;

proc reg data=tall;
  by xahead ;
  model y=x ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But you might want to talk to a statistician about better ways to analyze your data.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jan 2026 22:33:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982771#M49187</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-01-30T22:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982775#M49188</link>
      <description>&lt;P&gt;I know how to transpose and save out paraestimates from PROC REG. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jan 2026 02:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982775#M49188</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2026-01-31T02:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982776#M49189</link>
      <description>&lt;P&gt;Thanks this surely works.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was looking from IML with matrix OP.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jan 2026 02:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982776#M49189</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2026-01-31T02:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982779#M49190</link>
      <description>&lt;P&gt;Here are two ways you can use to get these parameter estimator within a data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;libname x v9 'C:\Users\xiakeshan\Documents\Downloads';
data x;
 set x._t_mm_temp_coll_n;
 array _x{*} off_max_ct_: ;
 do i=1 to dim(_x);
   y=_x{i};
   x=input(scan(vname(_x{i}),-1,'_'),best.);
   output;
 end;
 keep x y xahead;
run;


ods select none;
&lt;STRONG&gt;ods output   ParameterEstimates=  ParameterEstimates2;&lt;/STRONG&gt;
proc reg data=x ;
by xahead;
model y=x;
quit;
ods select all;
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;libname x v9 'C:\Users\xiakeshan\Documents\Downloads';
data x;
 set x._t_mm_temp_coll_n;
 array _x{*} off_max_ct_: ;
 do i=1 to dim(_x);
   y=_x{i};
   x=input(scan(vname(_x{i}),-1,'_'),best.);
   output;
 end;
 keep x y xahead;
run;


ods select none;
proc reg data=x &lt;STRONG&gt;outest=ParameterEstimates&lt;/STRONG&gt;;
by xahead;
model y=x;
quit;
ods select all;
&lt;/PRE&gt;</description>
      <pubDate>Sat, 31 Jan 2026 07:42:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982779#M49190</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-01-31T07:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982783#M49191</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;brilliant. Especially the part where you say "But this is neither much shorter nor safer than relying on PROC REG after transposing." That last sentence is very important.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The whole idea of avoiding transposing and working with data in the inefficient wide arrangement (as apparently&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/409584"&gt;@hellohere&lt;/a&gt;&amp;nbsp;would prefer)&amp;nbsp;to create one's own formulas in a data step or IML, that SAS has already programmed into a PROC, is very inefficient in the long run. SAS has already done the hard work to make sure PROC REG gives correct answers, and then had the code tested against a bazillion real-world data sets. There's no need for a user to create his or her own code, that is inefficient in terms of time, and probably will often create wrong answers, and avoids the power of SAS, which has already been paid for by people's employer or university. So again, I urge the OP to avoid this wide layout of the data and instead use the long layout of the data, as not using wide data sets solves a lot of problems easily.&lt;/P&gt;</description>
      <pubDate>Sat, 31 Jan 2026 11:57:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982783#M49191</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2026-01-31T11:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Reg on each row?! with Slope/Intercept saved out?!</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982786#M49192</link>
      <description>&lt;P&gt;Here is IML code/solution if you need it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname x v9 'C:\Users\xiakeshan\Documents\Downloads';
proc iml;
use x._t_mm_temp_coll_n(keep=off_max_ct:);
read all var _num_ into off_max_ct[c=vname];
close;
use x._t_mm_temp_coll_n;
read all var {xahead};
close;

parameters=j(nrow(xahead),2,.); /*Save Intercept and Slope parameter estimator*/
t_off_max_ct=t(off_max_ct);
x=j(nrow(t_off_max_ct),1,1)||t(inputn(scan(vname,-1,'_'),'best.'));
do i=1 to ncol(t_off_max_ct);
  y=t_off_max_ct[,i];
  parameters[i,]=t(solve(x`*x,x`*y));
end;

create want from xahead parameters[c={'xahead' 'Intercept' 'Slope'}];
append from xahead parameters;
close;
quit;



&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Feb 2026 03:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-Reg-on-each-row-with-Slope-Intercept-saved-out/m-p/982786#M49192</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-02-01T03:03:08Z</dc:date>
    </item>
  </channel>
</rss>

