The R Project SVN R

Rev

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

Rev 59039 Rev 61162
Line 16... Line 16...
16
\S4method{update}{mle}(object, \dots, evaluate = TRUE)
16
\S4method{update}{mle}(object, \dots, evaluate = TRUE)
17
}
17
}
18
\arguments{
18
\arguments{
19
 \item{object}{An existing fit.}
19
 \item{object}{An existing fit.}
20
 \item{\dots}{Additional arguments to the call, or arguments with
20
 \item{\dots}{Additional arguments to the call, or arguments with
21
   changed values. Use \code{name=NULL} to remove the argument \code{name}.}
21
   changed values. Use \code{name = NULL} to remove the argument \code{name}.}
22
 \item{evaluate}{If true evaluate the new call else return the call.}
22
 \item{evaluate}{If true evaluate the new call else return the call.}
23
}
23
}
24
\section{Methods}{
24
\section{Methods}{
25
  \describe{
25
  \describe{
26
    \item{\code{signature(object = "ANY")}}{Generic function: see
26
    \item{\code{signature(object = "ANY")}}{Generic function: see
Line 29... Line 29...
29
  }
29
  }
30
}
30
}
31
\examples{
31
\examples{
32
x <- 0:10
32
x <- 0:10
33
y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
33
y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
34
ll <- function(ymax=15, xhalf=6)
34
ll <- function(ymax = 15, xhalf = 6)
35
    -sum(stats::dpois(y, lambda=ymax/(1+x/xhalf), log=TRUE))
35
    -sum(stats::dpois(y, lambda = ymax/(1+x/xhalf), log = TRUE))
36
fit <- mle(ll)
36
fit <- mle(ll)
37
## note the recorded call contains ..1, a problem with S4 dispatch
37
## note the recorded call contains ..1, a problem with S4 dispatch
38
update(fit, fixed=list(xhalf=3))
38
update(fit, fixed = list(xhalf = 3))
39
}
39
}
40
\keyword{methods}
40
\keyword{methods}