</p>
<p>Before solving equations, their order is determined to:</p>
<ol style="list-style-type: decimal">
<li>Solve endogenous variables first, allowing them to be used as exogenous variables later.<br>
</li>
<li>Group interdependent equations into loops, ensuring proper substitution of exogenous variables.</li>
</ol>
<p>The Newton method works similarly but uses the Newton-Raphson algorithm to solve interdependent equations. This algorithm is implemented via the <code><a href="https://rdrr.io/pkg/rootSolve