| multiRoot | R Documentation | 
The function multiRoot searches for root (i.e, zero) of 
the vector-valued function func with respect to its first argument using 
the Gauss-Newton algorithm.
    multiRoot(func, theta, ..., verbose = FALSE, maxIter = 50, 
           thetaUp = NULL, thetaLow = NULL, tol = .Machine$double.eps^0.25)
| func | a m-vector function for which the root is sought. | 
| theta | the parameter vector first argument to func. | 
| thetaLow | the lower bound of theta. | 
| thetaUp | the upper bound of theta. | 
| verbose | print out the verbose, default is FALSE. | 
| maxIter | the maximum number of iterations, default is 20. | 
| tol | the desired accuracy (convergence tolerance), default is .Machine$double.eps^0.25. | 
| ... | an additional named or unmaned arguments to be passed to  | 
The function multiRoot finds an numerical approximation to
func(theta) = 0 using Newton method: theta = theta - solve(J, func(theta)) when m = p. 
This function can be used to solve the score function euqations for a maximum 
log likelihood estimate.
This function make use of numJacobian calculates an numerical approximation to
the m by p first order derivative of a m-vector valued function.
The parameter theta is updated by the Gauss-Newton method:
theta = theta - solve((t(J) x J), J x func(theta))
When m > p, if the nonlinear system has not solution, the method attempts to find a solution in the non-linear least squares sense (Gauss-Newton algorithm). The sum of square sum(t(U)xU), where U = func(theta), will be minimized.
A list with at least four components:
| root | a vector of theta that solves func(theta) = 0. | 
| f.root | a vector of f(root) that evaluates at theta = root. | 
| iter | number of iteratins used in the algorithm. | 
| convergence | 1 if the algorithm converges, 0 otherwise. | 
Bingshu E. Chen (bingshu.chen@queensu.ca)
Gauss, Carl Friedrich(1809). Theoria motus corporum coelestium in sectionibus conicis solem ambientum.
optim (which is preferred) and nlm, 
nlminb,
numJacobian, 
numScore, 
optimize and uniroot for one-dimension optimization.
  g = function(x, a) (c(x[1]+2*x[2]^3, x[2] - x[3]^3, a*sin(x[1]*x[2])))
  theta = c(1, 2, 3)
  multiRoot(g, theta, a = -3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.