# \donttest{
# Repeat variance step using nlme::fdHess
# method = "none" skips likelihood maximization
secr.refit(secrdemo.0, method = "none")
# Save data and coefficients after every 10 evaluations to a file
# with the default name 'progress.RDS'.
fit1 <- secr.fit(captdata, CL = TRUE, details = list(saveprogress = 10))
# Review progress. In this example, fit1 ran to completion,
# but the log stops at a multiple of 10 evaluations.
attr(readRDS('progress.RDS'), 'log')
# Restart at last line in log, suppressing overwrite of progress log
secr.refit('progress.RDS', details = list(saveprogress = FALSE))
# cleanup
unlink("progress.RDS")
# Example using secr.refit() to complete a relative density model
# fitCL <- secr.fit(OVpossumCH[[1]], buffer = 120, detectfn = 'HEX',
# CL = TRUE, model = D~x+y)
# fit <- secr.refit(fitCL, CL = FALSE, method = "none")
# coef(fitCL)
# coef(fit)
# predict(fit)
# }
Run the code above in your browser using DataLab