Examples for 'stats::profile.nls'


Method for Profiling nls Objects

Aliases: profile.nls

Keywords: nonlinear regression models

### ** Examples

## Don't show: 
od <- options(digits = 4)
## End(Don't show)
# obtain the fitted object
fm1 <- nls(demand ~ SSasympOrig(Time, A, lrc), data = BOD)
# get the profile for the fitted model: default level is too extreme
pr1 <- profile(fm1, alphamax = 0.05)
# profiled values for the two parameters
## IGNORE_RDIFF_BEGIN
pr1$A
       tau par.vals.A par.vals.lrc
1  -3.0873   13.59751      0.14033
2  -2.4957   14.46884      0.01607
3  -1.8906   15.41836     -0.11787
4  -1.2634   16.49088     -0.26877
5  -0.6080   17.75662     -0.44553
6   0.0000   19.14258     -0.63282
7   0.4998   20.52853     -0.80750
8   0.9465   22.06851     -0.98233
9   1.3780   23.98253     -1.17103
10  1.7908   26.44552     -1.37431
11  2.1841   29.75928     -1.59599
12  2.5559   34.43804     -1.84209
13  2.9028   41.42542     -2.12176
pr1$lrc
       tau par.vals.A par.vals.lrc
1  -2.9550  42.395076    -2.184153
2  -2.5201  33.446683    -1.836926
3  -2.0570  28.124205    -1.547326
4  -1.5710  24.656989    -1.293871
5  -1.0653  22.245847    -1.063030
6  -0.5412  20.482887    -0.845157
7   0.0000  19.142578    -0.632822
8   0.5539  18.095015    -0.420487
9   1.1022  17.273414    -0.207623
10  1.6298  16.621533     0.007939
11  2.1335  16.086803     0.234850
12  2.6052  15.638807     0.485009
13  3.0276  15.265409     0.779458
## IGNORE_RDIFF_END
# see also example(plot.profile.nls)
## Don't show: 
options(od)
## End(Don't show)

[Package stats version 4.2.3 Index]