This chapter discusses the analysis of data using nonlinear models such as nonlinear regression, general likelihood models, or Bayesian estimation. It presents two fitting functions, one for general minimization models and one for nonlinear regression. In typical use, they both have three arguments, specifying the model, the data, and starting estimates for the parameters. The formula in nonlinear models is an expression in S, involving data, parameters in the model, and any other relevant quantities. In most nonlinear modeling, the relevant data include not only variables similar to those encountered earlier, but also other quantities such as initial estimates for parameters or fixed values occurring in the model formula. Numerical methods for fitting nonlinear models typically can make use of the derivatives of the objective function or of the predictor with respect to the parameters to be estimated. As in linear regression, the sum-of-squares criterion in nonlinear regression can include weights. In linear regression, an optional argument supplies the weights.