<?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: Solving system of nonlinear equations inside IML in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756293#M5551</link>
    <description>&lt;P&gt;It seems that I sent the old log file. The error due to opt was fixed. The error which I am referring to it is the one below.&lt;/P&gt;&lt;P&gt;Moreover, You suggested to me to use the procedure in the&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2018/02/28/solve-system-nonlinear-equations-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/02/28/solve-system-nonlinear-equations-sas.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;does that mean that the one that I am using in my code is not correct or may not work in my case?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Salah_0-1627066319666.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61642iF9368A76E6F8B832/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Salah_0-1627066319666.png" alt="Salah_0-1627066319666.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Jul 2021 18:53:48 GMT</pubDate>
    <dc:creator>Salah</dc:creator>
    <dc:date>2021-07-23T18:53:48Z</dc:date>
    <item>
      <title>Solving system of nonlinear equations inside IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756158#M5547</link>
      <description>&lt;P&gt;Hello ....&lt;/P&gt;&lt;P&gt;I am trying to solve two equations simultaneously. I couldn't find anything for IML. Instead, I found&amp;nbsp; "proc model" and "solve" so I used submit and endsubmit inside my IML.&amp;nbsp;The problem which I am facing now is that I can't export the roots to IML. I would appreciate your help here. Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 11:07:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756158#M5547</guid>
      <dc:creator>Salah</dc:creator>
      <dc:date>2021-07-23T11:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Solving system of nonlinear equations inside IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756169#M5548</link>
      <description>&lt;P&gt;1. You can solve a system of nonlinear equations in SAS/IML by using the&amp;nbsp;NLPLM or NLPHQN subroutines. See the article, &lt;A href="https://blogs.sas.com/content/iml/2018/02/28/solve-system-nonlinear-equations-sas.html" target="_self"&gt;"Solve a system of nonlinear equations with SAS."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;2. I presume you meant to &lt;A href="https://blogs.sas.com/content/iml/2021/01/25/incomplete-gamma-function-sas.html" target="_self"&gt;specify the GAMMA function in SAS&lt;/A&gt; as part of the nonlinear equations. PROC MODEL is failing because there is not 'GAMA' function in SAS (one M).&lt;/P&gt;
&lt;P&gt;3. Don't worry about the color-coding in the editor. The editor gets confused by the SUBMIT/ENDSUBMIT block. When it sees a RUN or QUIT statement, it thinks a procedure has exited. It colors the PRINT statement red because it hasn't seen another 'PROC' statement after the RUN. Of course, if you eliminate the&amp;nbsp; SUBMIT block, that issue will vanish.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 12:31:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756169#M5548</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-07-23T12:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: Solving system of nonlinear equations inside IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756173#M5549</link>
      <description>&lt;P&gt;Thank you so much for the reply.&lt;/P&gt;
&lt;P&gt;Yes, I meant gamma and it was my mistake. I also looked at the link which you sent me but I like to know if the procedure that I used works?&lt;/P&gt;
&lt;P&gt;Moreover, after I fixed the spelling I received an error, regarding "n" but I am not using it inside the procedure? please see attached log file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you again&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.&lt;BR /&gt;NOTE: SAS (r) Proprietary Software 9.4 (TS1M2)&lt;BR /&gt;Licensed to UNIVERSITY OF JORDAN, Site 70235184.&lt;BR /&gt;NOTE: This session is executing on the X64_8PRO platform.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Updated analytical products:&lt;/P&gt;
&lt;P&gt;SAS/STAT 13.2&lt;BR /&gt;SAS/ETS 13.2&lt;BR /&gt;SAS/OR 13.2&lt;BR /&gt;SAS/IML 13.2&lt;BR /&gt;SAS/QC 13.2&lt;/P&gt;
&lt;P&gt;NOTE: Additional host information:&lt;/P&gt;
&lt;P&gt;X64_8PRO WIN 6.2.9200 Workstation&lt;/P&gt;
&lt;P&gt;NOTE: SAS initialization used:&lt;BR /&gt;real time 0.92 seconds&lt;BR /&gt;cpu time 0.62 seconds&lt;/P&gt;
&lt;P&gt;1 /*Solve system of non linear equations */&lt;BR /&gt;2&lt;BR /&gt;3 title1 'Solving a Simultaneous System';&lt;BR /&gt;4 data test;&lt;BR /&gt;5 input a b @@;&lt;BR /&gt;6 datalines;&lt;/P&gt;
&lt;P&gt;NOTE: SAS went to a new line when INPUT statement reached past the end of a line.&lt;BR /&gt;NOTE: The data set WORK.TEST has 3 observations and 2 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.09 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;8 ;&lt;BR /&gt;9&lt;BR /&gt;NOTE: Writing HTML Body file: sashtml.htm&lt;BR /&gt;10 proc model data=test;&lt;BR /&gt;11 eq.sqrt = sqrt(x) - y;&lt;BR /&gt;12 eq.hyperbola = a + b / x - y;&lt;/P&gt;
&lt;P&gt;13 solve x y / solveprint;&lt;BR /&gt;14 id a b;&lt;BR /&gt;15 run;&lt;/P&gt;
&lt;P&gt;16&lt;/P&gt;
&lt;P&gt;NOTE: PROCEDURE MODEL used (Total process time):&lt;BR /&gt;real time 28:52.50&lt;BR /&gt;cpu time 14.54 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;17 proc iml;&lt;BR /&gt;NOTE: IML Ready&lt;BR /&gt;18&lt;BR /&gt;19 seed=12345;&lt;BR /&gt;19 ! k=1;&lt;BR /&gt;20&lt;BR /&gt;21 alpha=2;&lt;BR /&gt;21 ! lambda=2;&lt;BR /&gt;22&lt;BR /&gt;23&lt;BR /&gt;24 n=100;&lt;BR /&gt;24 ! m=n;&lt;BR /&gt;24 ! R=J(m,1,0);&lt;BR /&gt;25&lt;BR /&gt;26 print alpha lambda;&lt;BR /&gt;27&lt;BR /&gt;28&lt;BR /&gt;29&lt;BR /&gt;30 W=J(m,1,0);&lt;BR /&gt;30 ! V=J(m,1,0);&lt;BR /&gt;30 ! X_p=J(m,1,0);&lt;BR /&gt;30 ! X_A=J(m,1,0);&lt;BR /&gt;30 ! U=J(m,1,0);&lt;BR /&gt;31&lt;BR /&gt;32 X=J(m,1,0);&lt;BR /&gt;33&lt;BR /&gt;34 do i=1 to m;&lt;BR /&gt;35 W[i]=Uniform(seed);&lt;BR /&gt;36 end;&lt;BR /&gt;37&lt;BR /&gt;38 S=1+R[m];&lt;BR /&gt;39 V[1]=W[1]**(1/S);&lt;BR /&gt;40&lt;BR /&gt;41 do i=2 to m;&lt;BR /&gt;42 S=S+(1+R[m-i+1]);&lt;BR /&gt;43 V[i]=W[i]**(1/S);&lt;BR /&gt;44 end;&lt;BR /&gt;45&lt;BR /&gt;46 do i=1 to m;&lt;BR /&gt;47&lt;BR /&gt;48 U[i]=1-prod( V[ m:( m-i+1)] );&lt;BR /&gt;48 ! ** the U's are the required progressively type II from U(0,1);&lt;BR /&gt;49&lt;BR /&gt;50 END;&lt;BR /&gt;51&lt;BR /&gt;52&lt;BR /&gt;53 X=( 1-(1-U)##(1/alpha) )##(1/lambda);&lt;BR /&gt;54&lt;BR /&gt;55&lt;BR /&gt;56 print X;&lt;BR /&gt;57&lt;BR /&gt;58 quit;&lt;BR /&gt;NOTE: Exiting IML.&lt;BR /&gt;NOTE: PROCEDURE IML used (Total process time):&lt;BR /&gt;real time 0.06 seconds&lt;BR /&gt;cpu time 0.06 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;59&lt;BR /&gt;60 proc iml;&lt;BR /&gt;NOTE: IML Ready&lt;BR /&gt;61&lt;BR /&gt;62 seed=12345;&lt;BR /&gt;62 ! k=1;&lt;BR /&gt;63&lt;BR /&gt;64 alpha=2;&lt;BR /&gt;64 ! lambda=2;&lt;BR /&gt;65&lt;BR /&gt;66&lt;BR /&gt;67 n=10;&lt;BR /&gt;67 ! m=n;&lt;BR /&gt;67 ! R=J(m,1,0);&lt;BR /&gt;68&lt;BR /&gt;69 print alpha lambda;&lt;BR /&gt;70&lt;BR /&gt;71&lt;BR /&gt;72&lt;BR /&gt;73 W=J(m,1,0);&lt;BR /&gt;73 ! V=J(m,1,0);&lt;BR /&gt;73 ! X_p=J(m,1,0);&lt;BR /&gt;73 ! X_A=J(m,1,0);&lt;BR /&gt;73 ! U=J(m,1,0);&lt;BR /&gt;74&lt;BR /&gt;75 X=J(m,1,0);&lt;BR /&gt;76&lt;BR /&gt;77 do i=1 to m;&lt;BR /&gt;78 W[i]=Uniform(seed);&lt;BR /&gt;79 end;&lt;BR /&gt;80&lt;BR /&gt;81 S=1+R[m];&lt;BR /&gt;82 V[1]=W[1]**(1/S);&lt;BR /&gt;83&lt;BR /&gt;84 do i=2 to m;&lt;BR /&gt;85 S=S+(1+R[m-i+1]);&lt;BR /&gt;86 V[i]=W[i]**(1/S);&lt;BR /&gt;87 end;&lt;BR /&gt;88&lt;BR /&gt;89 do i=1 to m;&lt;BR /&gt;90&lt;BR /&gt;91 U[i]=1-prod( V[ m:( m-i+1)] );&lt;BR /&gt;91 ! ** the U's are the required progressively type II from U(0,1);&lt;BR /&gt;92&lt;BR /&gt;93 END;&lt;BR /&gt;94&lt;BR /&gt;95&lt;BR /&gt;96 X=( 1-(1-U)##(1/alpha) )##(1/lambda);&lt;BR /&gt;97&lt;BR /&gt;98&lt;BR /&gt;99 print X;&lt;BR /&gt;100&lt;BR /&gt;101 quit;&lt;BR /&gt;NOTE: Exiting IML.&lt;BR /&gt;NOTE: PROCEDURE IML used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;102&lt;BR /&gt;103 proc iml;&lt;BR /&gt;NOTE: IML Ready&lt;BR /&gt;104&lt;BR /&gt;105 seed=12345;&lt;BR /&gt;105! k=1;&lt;BR /&gt;106&lt;BR /&gt;107 alpha=2;&lt;BR /&gt;107! lambda=2;&lt;BR /&gt;108&lt;BR /&gt;109&lt;BR /&gt;110 n=10;&lt;BR /&gt;110! m=n;&lt;BR /&gt;110! R=J(m,1,0);&lt;BR /&gt;111&lt;BR /&gt;112 print alpha lambda;&lt;BR /&gt;113&lt;BR /&gt;114&lt;BR /&gt;115&lt;BR /&gt;116 W=J(m,1,0);&lt;BR /&gt;116! V=J(m,1,0);&lt;BR /&gt;116! X_p=J(m,1,0);&lt;BR /&gt;116! X_A=J(m,1,0);&lt;BR /&gt;116! U=J(m,1,0);&lt;BR /&gt;117&lt;BR /&gt;118 X=J(m,1,0);&lt;BR /&gt;119&lt;BR /&gt;120 do i=1 to m;&lt;BR /&gt;121 W[i]=Uniform(seed);&lt;BR /&gt;122 end;&lt;BR /&gt;123&lt;BR /&gt;124 S=1+R[m];&lt;BR /&gt;125 V[1]=W[1]**(1/S);&lt;BR /&gt;126&lt;BR /&gt;127 do i=2 to m;&lt;BR /&gt;128 S=S+(1+R[m-i+1]);&lt;BR /&gt;129 V[i]=W[i]**(1/S);&lt;BR /&gt;130 end;&lt;BR /&gt;131&lt;BR /&gt;132 do i=1 to m;&lt;BR /&gt;133&lt;BR /&gt;134 U[i]=1-prod( V[ m:( m-i+1)] );&lt;BR /&gt;134! ** the U's are the required progressively type II from U(0,1);&lt;BR /&gt;135&lt;BR /&gt;136 END;&lt;BR /&gt;137&lt;BR /&gt;138&lt;BR /&gt;139 X=( 1-(1-U)##(1/alpha) )##(1/lambda);&lt;BR /&gt;140&lt;BR /&gt;141&lt;BR /&gt;142 *******************************************************************************;&lt;BR /&gt;143 *** MLE for the Kumaraswamy using Type II Adaptive progressive censoring ***** ;&lt;BR /&gt;144 *******************************************************************************;&lt;BR /&gt;145&lt;BR /&gt;146 start MLE_func(y) global (n,m,X,R);&lt;BR /&gt;147&lt;BR /&gt;148 func=0;&lt;BR /&gt;149&lt;BR /&gt;150 alpha=y[1];&lt;BR /&gt;151 lambda=y[2];&lt;BR /&gt;152&lt;BR /&gt;153&lt;BR /&gt;154 Sum_log=J(m,1,0);&lt;BR /&gt;155 Sum_log=log(x);&lt;BR /&gt;156&lt;BR /&gt;157 Sum_log_1=J(m,1,0);&lt;BR /&gt;158 Sum_log_1=log(1-X##lambda);&lt;BR /&gt;159&lt;BR /&gt;160&lt;BR /&gt;161 func=func + m*log(alpha*lambda)+(lambda-1)* Sum_log[+] + (alpha-1) * Sum_log_1[+] ;&lt;BR /&gt;162&lt;BR /&gt;163 Return(func);&lt;BR /&gt;164&lt;BR /&gt;165 finish;&lt;BR /&gt;NOTE: Module MLE_FUNC defined.&lt;BR /&gt;166&lt;BR /&gt;167&lt;BR /&gt;168&lt;BR /&gt;169&lt;BR /&gt;170 ************* Constrain MLE ***********************;&lt;BR /&gt;171&lt;BR /&gt;172 con={0.01 0.01 , . .};&lt;BR /&gt;173 x0={0.05, 0.05};&lt;BR /&gt;174 tc={10000 14000};&lt;BR /&gt;175&lt;BR /&gt;176 *************** MLE *********************;&lt;BR /&gt;177&lt;BR /&gt;178&lt;BR /&gt;179 call nlpnra(rc, MLE_ret, "MLE_func", x0, opt, con,tc);&lt;BR /&gt;ERROR: (execution) Matrix has not been set to a value.&lt;/P&gt;
&lt;P&gt;operation : NLPNRA at line 179 column 1&lt;BR /&gt;operands : *LIT1049, x0, opt, con, tc&lt;/P&gt;
&lt;P&gt;*LIT1049 1 row 1 col (character, size &lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;MLE_func&lt;/P&gt;
&lt;P&gt;x0 2 rows 1 col (numeric)&lt;/P&gt;
&lt;P&gt;0.05&lt;BR /&gt;0.05&lt;/P&gt;
&lt;P&gt;opt 0 row 0 col (type ?, size 0)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;con 2 rows 2 cols (numeric)&lt;/P&gt;
&lt;P&gt;0.01 0.01&lt;BR /&gt;. .&lt;/P&gt;
&lt;P&gt;tc 1 row 2 cols (numeric)&lt;/P&gt;
&lt;P&gt;10000 14000&lt;/P&gt;
&lt;P&gt;statement : CALL at line 179 column 1&lt;BR /&gt;180&lt;BR /&gt;181 alpha_mle =MLE_ret[1];&lt;BR /&gt;ERROR: (execution) Matrix has not been set to a value.&lt;/P&gt;
&lt;P&gt;operation : [ at line 181 column 19&lt;BR /&gt;operands : MLE_ret, *LIT1050&lt;/P&gt;
&lt;P&gt;MLE_ret 0 row 0 col (type ?, size 0)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;*LIT1050 1 row 1 col (numeric)&lt;/P&gt;
&lt;P&gt;1&lt;/P&gt;
&lt;P&gt;statement : ASSIGN at line 181 column 1&lt;BR /&gt;182 lambda_mle=MLE_ret[2];&lt;BR /&gt;ERROR: (execution) Matrix has not been set to a value.&lt;/P&gt;
&lt;P&gt;operation : [ at line 182 column 19&lt;BR /&gt;operands : MLE_ret, *LIT1051&lt;/P&gt;
&lt;P&gt;MLE_ret 0 row 0 col (type ?, size 0)&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;*LIT1051 1 row 1 col (numeric)&lt;/P&gt;
&lt;P&gt;2&lt;/P&gt;
&lt;P&gt;statement : ASSIGN at line 182 column 1&lt;BR /&gt;183&lt;BR /&gt;184&lt;BR /&gt;185 print alpha_mle lambda_mle;&lt;BR /&gt;ERROR: Matrix alpha_mle has not been set to a value.&lt;/P&gt;
&lt;P&gt;statement : PRINT at line 185 column 1&lt;BR /&gt;186&lt;BR /&gt;187&lt;BR /&gt;188&lt;BR /&gt;189&lt;BR /&gt;190 quit;&lt;BR /&gt;NOTE: Exiting IML.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE IML used (Total process time):&lt;BR /&gt;real time 0.08 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 13:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756173#M5549</guid>
      <dc:creator>Salah</dc:creator>
      <dc:date>2021-07-23T13:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Solving system of nonlinear equations inside IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756180#M5550</link>
      <description>&lt;P&gt;The log file tells you exactly what is wrong: You are using the variable OPT but you have not set it to a value:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;179 call nlpnra(rc, MLE_ret, "MLE_func", x0, opt, con,tc);&lt;BR /&gt;ERROR: (execution) Matrix has not been set to a value.&lt;/P&gt;
&lt;P&gt;operation : NLPNRA at line 179 column 1&lt;BR /&gt;operands : *LIT1049, x0, opt, con, tc&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;opt 0 row 0 col (type ?, size 0)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In general, search the log for the FIRST error. Fix that error. Then re-run and repeat the process until there are no errors.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also want to read the article, &lt;A href="https://blogs.sas.com/content/iml/2016/05/11/tips-before-optimization.html" target="_self"&gt;"Ten tips before you run an optimization."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 13:06:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756180#M5550</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-07-23T13:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Solving system of nonlinear equations inside IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756293#M5551</link>
      <description>&lt;P&gt;It seems that I sent the old log file. The error due to opt was fixed. The error which I am referring to it is the one below.&lt;/P&gt;&lt;P&gt;Moreover, You suggested to me to use the procedure in the&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2018/02/28/solve-system-nonlinear-equations-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/02/28/solve-system-nonlinear-equations-sas.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;does that mean that the one that I am using in my code is not correct or may not work in my case?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Salah_0-1627066319666.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61642iF9368A76E6F8B832/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Salah_0-1627066319666.png" alt="Salah_0-1627066319666.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 18:53:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756293#M5551</guid>
      <dc:creator>Salah</dc:creator>
      <dc:date>2021-07-23T18:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Solving system of nonlinear equations inside IML</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756306#M5552</link>
      <description>&lt;P&gt;The third paragraph of that article says&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;In SAS/ETS software, you can use the SOLVE statement in PROC MODEL to solve the system&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;so, yes, you can do it that way. It is not as efficient as solving the system in SAS/IML, but it'll work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest that you debug the PROC MODEL statement outside of the SUBMIT block and the IML loop. That is what is causing the errors. Your second equation is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;eq.Xsqr = Xsqr/&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;n&lt;/FONT&gt;&lt;/STRONG&gt;-alpha1*gamma(alpha1)*gamma(2/lambda1+1)/gamma(alpha1+2/lambda1+1);&lt;BR /&gt;and the error message is telling you that&amp;nbsp; n&amp;nbsp; has not been defined.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jul 2021 19:49:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Solving-system-of-nonlinear-equations-inside-IML/m-p/756306#M5552</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-07-23T19:49:07Z</dc:date>
    </item>
  </channel>
</rss>

