# nlscontour: Contour plot for nonlinear least squares In nlsrk: Runge-Kutta Solver for Function nls()

## Description

Takes as central values the results of non-linear least square fitting by the nls(base, stats) function, then draws a contour plot of the residual sum of squares function around these values.

## Usage

 ```1 2``` ```nlscontour(x, param1 = 1, param2 = 2, range1 = NULL, range2 = NULL, npoints = 100, filled = FALSE,colored=FALSE) ```

## Arguments

 `x` a `nls` model `param1` The number of the first parameter to plot in the parameters list of model formula `param2` The number of the second parameter to plot `range1` The range (min and max) for plotting parameter `param1`. Default = +/-4*Standard Error of the parameter `range2` The range (min and max) for plotting parameter `param2`. Default = +/-4*Standard Error of the parameter `npoints` Number of points of the grid for `contour`. Default = 100 `filled` Defines the style of the contour plot FALSE: lines (default), TRUE: filled contours (shades of gray) `colored` Defines the style of the contour plot FALSE: lines (default), TRUE: Colored contours (red= lower)

## Details

`npoints` defines the total number of points of the square grid used for drawing the contour plot. Thus, the grid will be of size `round(sqrt(npoints))*round(sqrt(npoints))`

## Value

an object of class `nlsgrid` with three components:

 `\$x ` the values used for the first parameter `\$y ` the values used for the second parameter `\$grid ` a square matrix: The values of the residual sum of squares for each combination of the parameters

...

## Author(s)

Jean-Sebastien Pierre
[email protected]

## References

~put references to the literature/web site here ~

`nls` `logis` `summary.nlsgrid`
 ```1 2 3 4 5``` ```data(logis) attach(logis) m1<-nls(y~k/(1+c*exp(-r*time)),data=logis,start=c(k=100,r=0.1,c=40)) nlscontour(m1) detach(logis) ```