How do you increase the maximum number of iterations (ie, the maxit.scale
parameter) in the lmrob
function in the robustbase
package in R?
The default is 200, but I want to increase it.
library(robustbase)
data(starsCYG, package="robustbase")
a1<-lmrob.control()
RlmST<-lmrob(log.light~log.Te,data=starsCYG,control=a1)
Increase maxit.scale
; it's not really clear from your question which one of the iteration counts breaks you want to increase, but I suppose it's maxit.scale
since it's the only one that is set to 200 by default. Here I increase maxit.scale
to 201:
a1$maxit.scale<-201
RlmST<-lmrob(log.light~log.Te,data=starsCYG,control=a1)
Anyway, you can change the other in pretty much the same way: check:
?lmrob.control
It might help if you said you were using the robustbase package.
?lmrob
would bring up a help page, and reading it points to lmrob.control
which looks like
lmrob.control(setting, seed = NULL, nResample = 500,
tuning.chi = NULL, bb = 0.5, tuning.psi = NULL,
max.it = 50, groups = 5, n.group = 400,
k.fast.s = 1, best.r.s = 2,
k.max = 200, maxit.scale = 200, k.m_s = 20,
refine.tol = 1e-7, rel.tol = 1e-7, solve.tol = 1e-7,
trace.lev = 0,
mts = 1000, subsampling = c("nonsingular", "simple"),
compute.rd = FALSE, method = "MM", psi = "bisquare",
numpoints = 10, cov = NULL,
split.type = c("f", "fi", "fii"), fast.s.large.n = 2000, ...)
with the detail
k.fast.s
(for the fast-S algorithm): Number of local improvement steps (“I-steps”) for each re-sampling candidate.
k.m_s
(for the MS algorithm): specifies after how many unsucessful refinement steps the algorithm stops.
best.rs
(for the fast-S algorithm): Number of of best candidates to be iterated further (ie, “refined”); is denoted t in Salibian-Barrera & Yohai(2006).
k.max
(for the fast-S algorithm): maximal number of refinement steps for the “fully” iterated best candidates.
maxit.scale
integer specifying the maximum number of C level find_scale()
iterations.
so you presumably want to change one of these.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.