Additional arguments to the call, or arguments with
changed values. Use name = NULL to remove the argument name.
evaluate
If true evaluate the new call else return the call.
Methods
signature(object = "ANY")
Generic function: see
update.
signature(object = "mle")
Update a fit.
Examples
x <- 0:10
y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
ll <- function(ymax = 15, xhalf = 6)
-sum(stats::dpois(y, lambda = ymax/(1+x/xhalf), log = TRUE))
fit <- mle(ll)
## note the recorded call contains ..1, a problem with S4 dispatch
update(fit, fixed = list(xhalf = 3))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(stats4)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/stats4/update-methods.Rd_%03d_medium.png", width=480, height=480)
> ### Name: update-methods
> ### Title: Methods for Function 'update' in Package 'stats4'
> ### Aliases: update-methods update,ANY-method update,mle-method
> ### Keywords: methods
>
> ### ** Examples
>
> x <- 0:10
> y <- c(26, 17, 13, 12, 20, 5, 9, 8, 5, 4, 8)
> ll <- function(ymax = 15, xhalf = 6)
+ -sum(stats::dpois(y, lambda = ymax/(1+x/xhalf), log = TRUE))
> fit <- mle(ll)
Warning message:
In stats::dpois(y, lambda = ymax/(1 + x/xhalf), log = TRUE) : NaNs produced
> ## note the recorded call contains ..1, a problem with S4 dispatch
> update(fit, fixed = list(xhalf = 3))
Call:
mle(minuslogl = ll, fixed = ..1)
Coefficients:
ymax xhalf
25.19609 3.00000
>
>
>
>
>
> dev.off()
null device
1
>