The R Project SVN R

Rev

Rev 68948 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68948 Rev 73628
Line 1... Line 1...
1
% File src/library/stats/man/SSfol.Rd
1
% File src/library/stats/man/SSfol.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2010 R Core Team
3
% Copyright 1995-2017 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{SSfol}
6
\name{SSfol}
7
\encoding{UTF-8}
7
\encoding{UTF-8}
8
\title{Self-Starting Nls First-order Compartment Model}
8
\title{Self-Starting Nls First-order Compartment Model}
Line 40... Line 40...
40
\author{\enc{José}{Jose} Pinheiro and Douglas Bates}
40
\author{\enc{José}{Jose} Pinheiro and Douglas Bates}
41
\seealso{\code{\link{nls}}, \code{\link{selfStart}}
41
\seealso{\code{\link{nls}}, \code{\link{selfStart}}
42
}
42
}
43
\examples{
43
\examples{
44
Theoph.1 <- Theoph[ Theoph$Subject == 1, ]
44
Theoph.1 <- Theoph[ Theoph$Subject == 1, ]
45
SSfol(Theoph.1$Dose, Theoph.1$Time, -2.5, 0.5, -3) # response only
45
with(Theoph.1, SSfol(Dose, Time, -2.5, 0.5, -3)) # response only
46
lKe <- -2.5; lKa <- 0.5; lCl <- -3
46
with(Theoph.1, local({  lKe <- -2.5; lKa <- 0.5; lCl <- -3
47
SSfol(Theoph.1$Dose, Theoph.1$Time, lKe, lKa, lCl) # response and gradient
47
  SSfol(Dose, Time, lKe, lKa, lCl) # response _and_ gradient
-
 
48
}))
48
getInitial(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph.1)
49
getInitial(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph.1)
49
## Initial values are in fact the converged values
50
## Initial values are in fact the converged values
50
fm1 <- nls(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph.1)
51
fm1 <- nls(conc ~ SSfol(Dose, Time, lKe, lKa, lCl), data = Theoph.1)
51
summary(fm1)
52
summary(fm1)
52
}
-
 
-
 
53
}%% TODO: visualize model parametrization as e.g. in ./SSasymp.Rd
53
\keyword{models}
54
\keyword{models}