Skip to main content
. 2021 Oct 26;8(11):160. doi: 10.3390/bioengineering8110160
Algorithm 2 Monte Carlo sampling for regression analysis.
  • fork=1:Ndo
    • x¯sampled=x¯+σ¯x;RN(0,1)
    • y¯sampled=y¯+σ¯y;RN(0,1)
    • Pk^=arg minPkS(Pk),
    • y^k=f(x¯sampled,Pk^)
  • end for

  • covP=cov(Pk(1:N))

  • σ¯P=diag(covP)

  • σ¯y^=k=1N(y^ky¯)2N1