title: Finding parameters of a system of non-linear equations in R using BB package
body: <p>I am trying to solve a system of equation to find parameters <code>(x[1] and x[2])</code> using BB package but R outputs Unsuccessful convergence precisely it is:</p>
  
  <pre><code>Iteration:  0   ||F(x0)||:  469.829 
  iteration:  10  ||F(xn)|| =   0.5105992 
  iteration:  20  ||F(xn)|| =   0.05530002 
  
  $`par`
  [1] 26.2772128 -0.9905601
  
  $residual
  [1] 0.01809358
  
  $fn.reduction
  [1] 664.413
  
  $feval
  [1] 31
  
  $iter
  [1] 25
  
  $convergence
  [1] 3
  
  $message
  [1] "Failure: Error in function evaluation"
  
  Warning message:
  In dfsane(par = p0, fn = f3) : Unsuccessful convergence.
  
  Simburr.f1 &lt;- function(n, tau) {
    u=runif(n)
    x&lt;- runif(n)
    lambda = exp(1+x)
    y= (1/(u^(1/lambda))-1)^(1/tau)
    y
  }
  
  y = Simburr.f1(300,0.5)
  x = runif(300)
  
  f3 &lt;- function(x) { 
    n=300
    x1 &lt;- x[1] 
    x2 &lt;- x[2]
    F &lt;- rep(NA, 2)
    F[1] &lt;- n/sum(log(1+y^(x[1])))
    F[2] &lt;- n/-sum(log(y))+(x[2]+1)*sum((log(y)*y^x[1])/(1+y^x[1]))
    return(F) 
  } 
  p0 &lt;- c(0.5,1) 
  dfsane(par=p0, fn=f3)
  </code></pre>