Dear Matias
When I run the following code I get 2 warnings:
lmrob.S(): refinements did not converge (to tol=1e-07) in 200 iterations
library(robustbase)
test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658,
3.044522,3.660994),
dist=c(100,180,280,30,220,6))
res <- lmrob(lconc~dist, dat=test)
res$converged gives TRUE as the IRWLS iterations after the lmrob.S() have converged.
It would be nice to have also the convergence status of lmrob.S() in the result object of lmrob().
Kind regards
Ren?
Ren? Locher E-Mail: rene.locher at zhwin.ch
Institut f?r Datenanalyse und Prozessdesign Tel: 052/ 267 7810
Z?rcher Hochschule Winterthur Fax: 052/ 268 7810
Technopark / J?gerstrasse 2
Postfach
CH-8400 Winterthur http://www.idp.zhwin.ch
P.S.
Here is the version of my system on which I have tested the example:
version _
## platform i386-pc-mingw32
## arch i386
## os mingw32
## system i386, mingw32
## status
## major 2
## minor 5.0
## year 2007
## month 04
## day 23
## svn rev 41293
## language R
## version.string R version 2.5.0 (2007-04-23)
library(help=robustbase)
## Version: 0.2-7
[RsR] lmrob: lmrob.S()-Warning is not in the result returned
7 messages · Matias Salibian-Barrera, Locher René (lor), Henric Nilsson (Public) +1 more
2 days later
"ReneL" == Locher Ren? (lor) <lor at zhwin.ch>
on Tue, 5 Jun 2007 18:24:47 +0200 writes:
ReneL> Dear Matias When I run the following code I get 2
ReneL> warnings:
ReneL> lmrob.S(): refinements did not converge (tol=1e-07) in 200 iterations
library(robustbase)
test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658,
3.044522,3.660994),
dist=c(100,180,280,30,220,6))
res <- lmrob(lconc~dist, dat=test)
ReneL> res$converged gives TRUE as the IRWLS iterations after the lmrob.S() have converged.
ReneL> It would be nice to have also the convergence status of lmrob.S() in the result object of lmrob().
I agree.
HOWEVER, I cannot see / reproduce the convergence warnings
problems you mention, neither the above, nor the one you sent
yesterday.
Are you *REALLY* sure, you are not using an older version of
"robustbase" or mixing versions of robustbase,
or are using 'lmrob' (there was a package of that name) and
'robustbase' simultaneously?
Note: For such reports, do use sessionInfo().
Regards,
Martin
ReneL> Kind regards
ReneL> Ren?
ReneL> Ren? Locher E-Mail: rene.locher at zhwin.ch
ReneL> Institut f?r Datenanalyse und Prozessdesign Tel: 052/ 267 7810
ReneL> Z?rcher Hochschule Winterthur Fax: 052/ 268 7810
ReneL> Technopark / J?gerstrasse 2
ReneL> Postfach
ReneL> CH-8400 Winterthur http://www.idp.zhwin.ch
ReneL> P.S.
ReneL> Here is the version of my system on which I have tested the example:
ReneL> version _
ReneL> ## platform i386-pc-mingw32
ReneL> ## arch i386
ReneL> ## os mingw32
ReneL> ## system i386, mingw32
ReneL> ## status
ReneL> ## major 2
ReneL> ## minor 5.0
ReneL> ## year 2007
ReneL> ## month 04
ReneL> ## day 23
ReneL> ## svn rev 41293
ReneL> ## language R
ReneL> ## version.string R version 2.5.0 (2007-04-23)
ReneL> library(help=robustbase)
ReneL> ## Version: 0.2-7
Thanks Rene for pointing these problems out. I can reproduce the first warning (produced by lmrob.S()) -- I'm copying my output below. Of course, the warning disappears if you weaken the convergence criteria a little: my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- lmrob(lconc~dist, dat=test, control=my.ctrl) However, *I can't* reproduce Rene's second warning: "rwls(): not converged in 1000 lambda iterations" warning. I will look into it a bit further. Matias
version
_ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 3.1 year 2006 month 06 day 01 svn rev 38247 language R version.string Version 2.3.1 (2006-06-01)
library(robustbase) test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658,
+ 3.044522,3.660994), + dist=c(100,180,280,30,220,6))
res <- lmrob(lconc~dist, dat=test)
Warning messages: 1: lmrob.S(): refinements did not converge (to tol=1e-07) in 200 iterations 2: lmrob.S(): refinements did not converge (to tol=1e-07) in 200 iterations
my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- lmrob(lconc~dist, dat=test, control=my.ctrl) res
Call: lmrob(formula = lconc ~ dist, data = test) Coefficients: (Intercept) dist 3.690387 -0.003707
res2
Call: lmrob(formula = lconc ~ dist, data = test, control = my.ctrl) Coefficients: (Intercept) dist 3.690387 -0.003707
res$scale
[1] 0.2506454
res2$scale
[1] 0.2506544
Martin Maechler wrote:
"ReneL" == Locher Ren? (lor) <lor at zhwin.ch>
on Tue, 5 Jun 2007 18:24:47 +0200 writes:
ReneL> Dear Matias When I run the following code I get 2
ReneL> warnings:
ReneL> lmrob.S(): refinements did not converge (tol=1e-07) in 200 iterations
library(robustbase)
test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658,
3.044522,3.660994),
dist=c(100,180,280,30,220,6))
res <- lmrob(lconc~dist, dat=test)
ReneL> res$converged gives TRUE as the IRWLS iterations after the lmrob.S() have converged.
ReneL> It would be nice to have also the convergence status of lmrob.S() in the result object of lmrob().
I agree.
HOWEVER, I cannot see / reproduce the convergence warnings
problems you mention, neither the above, nor the one you sent
yesterday.
Are you *REALLY* sure, you are not using an older version of
"robustbase" or mixing versions of robustbase,
or are using 'lmrob' (there was a package of that name) and
'robustbase' simultaneously?
Note: For such reports, do use sessionInfo().
Regards,
Martin
ReneL> Kind regards
ReneL> Ren?
ReneL> Ren? Locher E-Mail: rene.locher at zhwin.ch
ReneL> Institut f?r Datenanalyse und Prozessdesign Tel: 052/ 267 7810
ReneL> Z?rcher Hochschule Winterthur Fax: 052/ 268 7810
ReneL> Technopark / J?gerstrasse 2
ReneL> Postfach
ReneL> CH-8400 Winterthur http://www.idp.zhwin.ch
ReneL> P.S.
ReneL> Here is the version of my system on which I have tested the example:
ReneL> version _
ReneL> ## platform i386-pc-mingw32
ReneL> ## arch i386
ReneL> ## os mingw32
ReneL> ## system i386, mingw32
ReneL> ## status
ReneL> ## major 2
ReneL> ## minor 5.0
ReneL> ## year 2007
ReneL> ## month 04
ReneL> ## day 23
ReneL> ## svn rev 41293
ReneL> ## language R
ReneL> ## version.string R version 2.5.0 (2007-04-23)
ReneL> library(help=robustbase)
ReneL> ## Version: 0.2-7
_____________________________________________________ Matias Salibian-Barrera - Department of Statistics The University of British Columbia Phone: (604) 822-3410 - Fax: (604) 822-6960 "The plural of anecdote is not data" (George Stigler?)
"MS" == Matias Salibian-Barrera <matias at stat.ubc.ca>
on Thu, 07 Jun 2007 09:35:46 -0700 writes:
MS> Thanks Rene for pointing these problems out.
MS> I can reproduce the first warning (produced by
MS> lmrob.S())
and I can too. I must have been to hasty when trying out the
two cases.
MS> I'm copying my output below. Of course,
MS> the warning disappears if you weaken the convergence
MS> criteria a little:
MS> my.ctrl <- lmrob.control(refine.tol=1e-5)
MS> res2 <- lmrob(lconc~dist, dat=test, control=my.ctrl)
Yes.
When using lmrob.S() automatically -- as probably in
99.9% of the cases, calling it indirectly from lmrob(....),
we (package authors) should try to ``make it converge''
automatically if possible, maybe by relaxing the convergence
criterion automatically there ....
MS> However, *I can't* reproduce Rene's second warning: "rwls(): not
MS> converged in 1000 lambda iterations" warning. I will look into it a bit
MS> further.
indeed, and I can't either - carefully checking a 2nd time.
Rene, maybe you can try to use debug(.) and
see the exact lmrob.S(.) call which leads to the lambda
iteration warnings.
maybe we can talk about this bi-laterally.
Martin
MS> Matias
MS>
MS> > version
MS> _
MS> platform i686-pc-linux-gnu
MS> arch i686
MS> os linux-gnu
MS> system i686, linux-gnu
MS> status
MS> major 2
MS> minor 3.1
MS> year 2006
MS> month 06
MS> day 01
MS> svn rev 38247
MS> language R
MS> version.string Version 2.3.1 (2006-06-01)
MS> > library(robustbase)
MS> > test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658,
MS> + 3.044522,3.660994),
MS> + dist=c(100,180,280,30,220,6))
MS> > res <- lmrob(lconc~dist, dat=test)
MS> Warning messages:
MS> 1: lmrob.S(): refinements did not converge (to tol=1e-07) in 200 iterations
MS> 2: lmrob.S(): refinements did not converge (to tol=1e-07) in 200 iterations
MS> > my.ctrl <- lmrob.control(refine.tol=1e-5)
MS> > res2 <- lmrob(lconc~dist, dat=test, control=my.ctrl)
MS> > res
MS>
MS> Call:
MS> lmrob(formula = lconc ~ dist, data = test)
MS>
MS> Coefficients:
MS> (Intercept) dist
MS> 3.690387 -0.003707
MS>
MS> > res2
MS>
MS> Call:
MS> lmrob(formula = lconc ~ dist, data = test, control = my.ctrl)
MS>
MS> Coefficients:
MS> (Intercept) dist
MS> 3.690387 -0.003707
MS>
MS> > res$scale
MS> [1] 0.2506454
MS> > res2$scale
MS> [1] 0.2506544
Martin Maechler wrote:
>>>>>> "ReneL" == Locher Ren? (lor) <lor at zhwin.ch> >>>>>> on Tue, 5 Jun 2007 18:24:47 +0200 writes: > > ReneL> Dear Matias When I run the following code I get 2 > ReneL> warnings: > > ReneL> lmrob.S(): refinements did not converge (tol=1e-07) in 200 iterations > > library(robustbase) > test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, > 3.044522,3.660994), > dist=c(100,180,280,30,220,6)) > res <- lmrob(lconc~dist, dat=test) > > ReneL> res$converged gives TRUE as the IRWLS iterations after the lmrob.S() have converged. > > ReneL> It would be nice to have also the convergence status of lmrob.S() in the result object of lmrob(). > > I agree. > > HOWEVER, I cannot see / reproduce the convergence warnings > problems you mention, neither the above, nor the one you sent > yesterday. > > Are you *REALLY* sure, you are not using an older version of > "robustbase" or mixing versions of robustbase, > or are using 'lmrob' (there was a package of that name) and > 'robustbase' simultaneously? > > Note: For such reports, do use sessionInfo(). > > Regards, > Martin > > ReneL> Kind regards > > ReneL> Ren? > > > ReneL> Ren? Locher E-Mail: rene.locher at zhwin.ch > ReneL> Institut f?r Datenanalyse und Prozessdesign Tel: 052/ 267 7810 > ReneL> Z?rcher Hochschule Winterthur Fax: 052/ 268 7810 > ReneL> Technopark / J?gerstrasse 2 > ReneL> Postfach > ReneL> CH-8400 Winterthur http://www.idp.zhwin.ch > > ReneL> P.S. > > ReneL> Here is the version of my system on which I have tested the example: > > ReneL> version _ > ReneL> ## platform i386-pc-mingw32 > ReneL> ## arch i386 > ReneL> ## os mingw32 > ReneL> ## system i386, mingw32 > ReneL> ## status > ReneL> ## major 2 > ReneL> ## minor 5.0 > ReneL> ## year 2007 > ReneL> ## month 04 > ReneL> ## day 23 > ReneL> ## svn rev 41293 > ReneL> ## language R > ReneL> ## version.string R version 2.5.0 (2007-04-23) > > ReneL> library(help=robustbase) > ReneL> ## Version: 0.2-7 -- _____________________________________________________ Matias Salibian-Barrera - Department of Statistics The University of British Columbia Phone: (604) 822-3410 - Fax: (604) 822-6960 "The plural of anecdote is not data" (George Stigler?) >>>>> ">>" == Matias Salibian-Barrera <matias at stat.ubc.ca> >>>>> on Thu, 07 Jun 2007 09:35:46 -0700 writes: >>> Thanks Rene for pointing these problems out. >>> I can reproduce the first warning (produced by >>> lmrob.S()) -- I'm copying my output below. Of course, >>> the warning disappears if you weaken the convergence >>> criteria a little: >>> my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- >>> lmrob(lconc~dist, dat=test, control=my.ctrl) >>> However, *I can't* reproduce Rene's second warning: >>> "rwls(): not converged in 1000 lambda iterations" >>> warning. I will look into it a bit further. >>> Matias >> version >>> _ platform i686-pc-linux-gnu arch i686 os >>> linux-gnu system i686, linux-gnu status major 2 minor >>> 3.1 year 2006 month 06 day 01 svn rev 38247 language R >>> version.string Version 2.3.1 (2006-06-01) >> library(robustbase) test <- >> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, >>> + 3.044522,3.660994), + dist=c(100,180,280,30,220,6)) >> res <- lmrob(lconc~dist, dat=test) >>> Warning messages: 1: lmrob.S(): refinements did not >>> converge (to tol=1e-07) in 200 iterations 2: lmrob.S(): >>> refinements did not converge (to tol=1e-07) in 200 >>> iterations >> my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- >> lmrob(lconc~dist, dat=test, control=my.ctrl) res >>> Call: lmrob(formula = lconc ~ dist, data = test) >>> Coefficients: (Intercept) dist 3.690387 -0.003707 >> res2 >>> Call: lmrob(formula = lconc ~ dist, data = test, control >>> = my.ctrl) >>> Coefficients: (Intercept) dist 3.690387 -0.003707 >> res$scale >>> [1] 0.2506454 >> res2$scale >>> [1] 0.2506544
>>> Martin Maechler wrote:
>>>>>>> "ReneL" == Locher Ren? (lor) <lor at zhwin.ch> on Tue,
>>>>>>> 5 Jun 2007 18:24:47 +0200 writes:
>>
ReneL> Dear Matias When I run the following code I get 2
ReneL> warnings:
>>
ReneL> lmrob.S(): refinements did not converge (tol=1e-07)
ReneL> in 200 iterations
>>
>> library(robustbase) test <-
>> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658,
>> 3.044522,3.660994), dist=c(100,180,280,30,220,6)) res <-
>> lmrob(lconc~dist, dat=test)
>>
ReneL> res$converged gives TRUE as the IRWLS iterations
ReneL> after the lmrob.S() have converged.
>>
ReneL> It would be nice to have also the convergence status
ReneL> of lmrob.S() in the result object of lmrob().
>>
>> I agree.
>>
>> HOWEVER, I cannot see / reproduce the convergence
>> warnings problems you mention, neither the above, nor the
>> one you sent yesterday.
>>
>> Are you *REALLY* sure, you are not using an older version
>> of "robustbase" or mixing versions of robustbase, or are
>> using 'lmrob' (there was a package of that name) and
>> 'robustbase' simultaneously?
>>
>> Note: For such reports, do use sessionInfo().
Ciao Martin I had started R freshly to run my example. Here the full output (without start-up message):
options(STERM='iESS', editor='gnuclient.exe') library(robustbase) test <- data.frame(lconc = log(c(29.5, 40.1, 21.1, 25.3, 27.3, 25.2,
+ 26.9, 19.1, 16.4)), + dist = c(520, 1480, 1780, 740, 540, 1050, 1100, + 1640, 1860))
res <- lmrob(lconc~dist, dat=test)
Warning messages: 1: rwls(): not converged in 1000 lambda iterations 2: rwls(): not converged in 1000 lambda iterations 3: rwls(): not converged in 1000 lambda iterations 4: rwls(): not converged in 1000 lambda iterations
And her my sessionInfo right afterwards:
sessionInfo()
R version 2.5.0 (2007-04-23)
i386-pc-mingw32
locale:
LC_COLLATE=German_Switzerland.1252;LC_CTYPE=German_Switzerland.1252;LC_MONETARY=German_Switzerland.1252;LC_NUMERIC=C;LC_TIME=German_Switzerland.1252
attached base packages:
[1] "stats" "graphics" "grDevices" "utils" "datasets" "methods"
[7] "base"
other attached packages:
robustbase
"0.2-7"
And here is the output in debugging mode. I hope this helps.
debug(lmrob)
debug(lmrob.fit.MM)
debug(lmrob.MM)
## first level
lmrob(lconc~dist, dat=test)
Browse[1]>c
## second level
z <- lmrob.fit.MM(x, y, control = control)
Browse[1]>c
## third level
final.MM <- lmrob.MM(x = x, y = y, beta.initial = iCoef, scale = init.S$scale,
control = control)
Browse[1]>n ## repeated until call to .C()
## arguments just before the call to fourth level
Browse[1]> x
(Intercept) dist
1 1 520
2 1 1480
3 1 1780
4 1 740
5 1 540
6 1 1050
7 1 1100
8 1 1640
9 1 1860
attr(,"assign")
[1] 0 1
Browse[1]> y
1 2 3 4 5 6 7 8
3.384390 3.691376 3.049273 3.230804 3.306887 3.226844 3.292126 2.949688
9
2.797281
Browse[1]> print(n)
[1] 9
Browse[1]> p
[1] 2
Browse[1]> control$max.it
[1] 50
Browse[1]> c.psi
[1] 4.685061
Browse[1]> c
## fourth level
b <- .C("R_lmrob_MM", x = as.double(x), y = as.double(y), n = as.integer(n),
p = as.integer(p), beta.initial = as.double(beta.initial),
scale = as.double(scale), coef = double(p), iter = as.integer(control$max.it),
c.psi = c.psi, converged = logical(1), PACKAGE = "robustbase")[c("coef",
"scale", "converged", "iter")]
Warning messages:
1: rwls(): not converged in 1000 lambda iterations
2: rwls(): not converged in 1000 lambda iterations
3: rwls(): not converged in 1000 lambda iterations
4: rwls(): not converged in 1000 lambda iterations
Everything works fine with my R, except that I cannot use successfully the package debug since I have updated R to version 2.5.0. Since then, mtrace(fun) exits with the error message "Error in all.levs[[j]] : subscript out of bounds" with functions I have tested in former versions of R without any problems! But that's another story. By the way: Before I update R, I remove all the packages installed and install the latest versions after updating R.
I hope this helps. I am afraid that my problem is platform dependent.
Kind regards
Ren?
Ren? Locher E-Mail: rene.locher at zhwin.ch
Institut f?r Datenanalyse und Prozessdesign Tel: 052/ 267 7810
Z?rcher Hochschule Winterthur Fax: 052/ 268 7810
Technopark / J?gerstrasse 2
Postfach
CH-8400 Winterthur http://www.idp.zhwin.ch
|-----Original Message-----
|From: Martin Maechler [mailto:maechler at stat.math.ethz.ch]
|Sent: Friday, June 08, 2007 9:01 AM
|To: Matias Salibian-Barrera
|Cc: r-sig-robust at r-project.org; Locher Ren? (lor); Martin Maechler
|Subject: Re: [RsR] lmrob: lmrob.S()-Warning is not in the
|result returned
|
|
| MS> However, *I can't* reproduce Rene's second warning: "rwls(): not
| MS> converged in 1000 lambda iterations" warning. I will
|look into it a bit
| MS> further.
|
|indeed, and I can't either - carefully checking a 2nd time.
|
|Rene, maybe you can try to use debug(.) and
|see the exact lmrob.S(.) call which leads to the lambda
|iteration warnings.
|
| MS> Matias
| MS>
| MS> > version
| MS> _
| MS> platform i686-pc-linux-gnu
| MS> arch i686
| MS> os linux-gnu
| MS> system i686, linux-gnu
| MS> status
| MS> major 2
| MS> minor 3.1
| MS> year 2006
| MS> month 06
| MS> day 01
| MS> svn rev 38247
| MS> language R
| MS> version.string Version 2.3.1 (2006-06-01)
| MS> > library(robustbase)
| MS> > test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658,
| MS> + 3.044522,3.660994),
| MS> + dist=c(100,180,280,30,220,6))
| MS> > res <- lmrob(lconc~dist, dat=test)
| MS> Warning messages:
| MS> 1: lmrob.S(): refinements did not converge (to
|tol=1e-07) in 200 iterations
| MS> 2: lmrob.S(): refinements did not converge (to
|tol=1e-07) in 200 iterations
| MS> > my.ctrl <- lmrob.control(refine.tol=1e-5)
| MS> > res2 <- lmrob(lconc~dist, dat=test, control=my.ctrl)
| MS> > res
| MS>
| MS> Call:
| MS> lmrob(formula = lconc ~ dist, data = test)
| MS>
| MS> Coefficients:
| MS> (Intercept) dist
| MS> 3.690387 -0.003707
| MS>
| MS> > res2
| MS>
| MS> Call:
| MS> lmrob(formula = lconc ~ dist, data = test, control = my.ctrl)
| MS>
| MS> Coefficients:
| MS> (Intercept) dist
| MS> 3.690387 -0.003707
| MS>
| MS> > res$scale
| MS> [1] 0.2506454
| MS> > res2$scale
| MS> [1] 0.2506544
|
| Martin Maechler wrote:
| >>>>>> "ReneL" == Locher Ren? (lor) <lor at zhwin.ch> | >>>>>> on Tue, 5 Jun 2007 18:24:47 +0200 writes: | > | > ReneL> Dear Matias When I run the following code I get 2 | > ReneL> warnings: | > | > ReneL> lmrob.S(): refinements did not converge |(tol=1e-07) in 200 iterations | > | > library(robustbase) | > test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, | > 3.044522,3.660994), | > dist=c(100,180,280,30,220,6)) | > res <- lmrob(lconc~dist, dat=test) | > | > ReneL> res$converged gives TRUE as the IRWLS iterations |after the lmrob.S() have converged. | > | > ReneL> It would be nice to have also the convergence |status of lmrob.S() in the result object of lmrob(). | > | > I agree. | > | > HOWEVER, I cannot see / reproduce the convergence warnings | > problems you mention, neither the above, nor the one you sent | > yesterday. | > | > Are you *REALLY* sure, you are not using an older version of | > "robustbase" or mixing versions of robustbase, | > or are using 'lmrob' (there was a package of that name) and | > 'robustbase' simultaneously? | > | > Note: For such reports, do use sessionInfo(). | > | > Regards, | > Martin | > | > ReneL> Kind regards | > | > ReneL> Ren? | > | > | > ReneL> Ren? Locher |E-Mail: rene.locher at zhwin.ch | > ReneL> Institut f?r Datenanalyse und Prozessdesign |Tel: 052/ 267 7810 | > ReneL> Z?rcher Hochschule Winterthur |Fax: 052/ 268 7810 | > ReneL> Technopark / J?gerstrasse 2 | > ReneL> Postfach | > ReneL> CH-8400 Winterthur |http://www.idp.zhwin.ch | > | > ReneL> P.S. | > | > ReneL> Here is the version of my system on which I have |tested the example: | > | > ReneL> version _ | > ReneL> ## platform i386-pc-mingw32 | > ReneL> ## arch i386 | > ReneL> ## os mingw32 | > ReneL> ## system i386, mingw32 | > ReneL> ## status | > ReneL> ## major 2 | > ReneL> ## minor 5.0 | > ReneL> ## year 2007 | > ReneL> ## month 04 | > ReneL> ## day 23 | > ReneL> ## svn rev 41293 | > ReneL> ## language R | > ReneL> ## version.string R version 2.5.0 (2007-04-23) | > | > ReneL> library(help=robustbase) | > ReneL> ## Version: 0.2-7 | | | | -- | _____________________________________________________ | Matias Salibian-Barrera - Department of Statistics | The University of British Columbia | Phone: (604) 822-3410 - Fax: (604) 822-6960 | "The plural of anecdote is not data" (George Stigler?) | | | | >>>>> ">>" == Matias Salibian-Barrera <matias at stat.ubc.ca> | >>>>> on Thu, 07 Jun 2007 09:35:46 -0700 writes: | | >>> Thanks Rene for pointing these problems out. | | >>> I can reproduce the first warning (produced by | >>> lmrob.S()) -- I'm copying my output below. Of course, | >>> the warning disappears if you weaken the convergence | >>> criteria a little: | | >>> my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- | >>> lmrob(lconc~dist, dat=test, control=my.ctrl) | | >>> However, *I can't* reproduce Rene's second warning: | >>> "rwls(): not converged in 1000 lambda iterations" | >>> warning. I will look into it a bit further. | | >>> Matias | | | | >> version | >>> _ platform i686-pc-linux-gnu arch i686 os | >>> linux-gnu system i686, linux-gnu status major 2 minor | >>> 3.1 year 2006 month 06 day 01 svn rev 38247 language R | >>> version.string Version 2.3.1 (2006-06-01) | >> library(robustbase) test <- | >> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, | >>> + 3.044522,3.660994), + dist=c(100,180,280,30,220,6)) | >> res <- lmrob(lconc~dist, dat=test) | >>> Warning messages: 1: lmrob.S(): refinements did not | >>> converge (to tol=1e-07) in 200 iterations 2: lmrob.S(): | >>> refinements did not converge (to tol=1e-07) in 200 | >>> iterations | >> my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- | >> lmrob(lconc~dist, dat=test, control=my.ctrl) res | | >>> Call: lmrob(formula = lconc ~ dist, data = test) | | >>> Coefficients: (Intercept) dist 3.690387 -0.003707 | | >> res2 | | >>> Call: lmrob(formula = lconc ~ dist, data = test, control | >>> = my.ctrl) | | >>> Coefficients: (Intercept) dist 3.690387 -0.003707 | | >> res$scale | >>> [1] 0.2506454 | >> res2$scale | >>> [1] 0.2506544 | | |
| >>> Martin Maechler wrote:
| >>>>>>> "ReneL" == Locher Ren? (lor) <lor at zhwin.ch> on Tue, | >>>>>>> 5 Jun 2007 18:24:47 +0200 writes: | >> | ReneL> Dear Matias When I run the following code I get 2 | ReneL> warnings: | >> | ReneL> lmrob.S(): refinements did not converge (tol=1e-07) | ReneL> in 200 iterations | >> | >> library(robustbase) test <- | >> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, | >> 3.044522,3.660994), dist=c(100,180,280,30,220,6)) res <- | >> lmrob(lconc~dist, dat=test) | >> | ReneL> res$converged gives TRUE as the IRWLS iterations | ReneL> after the lmrob.S() have converged. | >> | ReneL> It would be nice to have also the convergence status | ReneL> of lmrob.S() in the result object of lmrob(). | >> | >> I agree. | >> | >> HOWEVER, I cannot see / reproduce the convergence | >> warnings problems you mention, neither the above, nor the | >> one you sent yesterday. | >> | >> Are you *REALLY* sure, you are not using an older version | >> of "robustbase" or mixing versions of robustbase, or are | >> using 'lmrob' (there was a package of that name) and | >> 'robustbase' simultaneously? | >> | >> Note: For such reports, do use sessionInfo(). | |
Den Fr, 2007-06-08, 11:21 skrev Locher Ren? (lor):
Ciao Martin I had started R freshly to run my example. Here the full output (without start-up message):
options(STERM='iESS', editor='gnuclient.exe') library(robustbase) test <- data.frame(lconc = log(c(29.5, 40.1, 21.1, 25.3, 27.3, 25.2,
+ 26.9, 19.1, 16.4)), + dist = c(520, 1480, 1780, 740, 540, 1050, 1100, + 1640, 1860))
res <- lmrob(lconc~dist, dat=test)
Warning messages: 1: rwls(): not converged in 1000 lambda iterations 2: rwls(): not converged in 1000 lambda iterations 3: rwls(): not converged in 1000 lambda iterations 4: rwls(): not converged in 1000 lambda iterations
I can confirm this as well using
sessionInfo()
R version 2.5.0 Patched (2007-05-24 r41696) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" [7] "base" other attached packages: robustbase "0.2-7" However, I don't see the problem under
sessionInfo()
R version 2.4.1 Patched (2007-03-15 r40854) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" "base" other attached packages: robustbase "0.2-7" And when comparing e.g. `res$fitted.values' between these two R versions, they seem identical.
And her my sessionInfo right afterwards:
sessionInfo()
R version 2.5.0 (2007-04-23)
i386-pc-mingw32
locale:
LC_COLLATE=German_Switzerland.1252;LC_CTYPE=German_Switzerland.1252;LC_MONETARY=German_Switzerland.1252;LC_NUMERIC=C;LC_TIME=German_Switzerland.1252
attached base packages:
[1] "stats" "graphics" "grDevices" "utils" "datasets" "methods"
[7] "base"
other attached packages:
robustbase
"0.2-7"
And here is the output in debugging mode. I hope this helps.
debug(lmrob)
debug(lmrob.fit.MM)
debug(lmrob.MM)
## first level
lmrob(lconc~dist, dat=test)
Browse[1]>c
## second level
z <- lmrob.fit.MM(x, y, control = control)
Browse[1]>c
## third level
final.MM <- lmrob.MM(x = x, y = y, beta.initial = iCoef, scale =
init.S$scale,
control = control)
Browse[1]>n ## repeated until call to .C()
## arguments just before the call to fourth level
Browse[1]> x
(Intercept) dist
1 1 520
2 1 1480
3 1 1780
4 1 740
5 1 540
6 1 1050
7 1 1100
8 1 1640
9 1 1860
attr(,"assign")
[1] 0 1
Browse[1]> y
1 2 3 4 5 6 7 8
3.384390 3.691376 3.049273 3.230804 3.306887 3.226844 3.292126 2.949688
9
2.797281
Browse[1]> print(n)
[1] 9
Browse[1]> p
[1] 2
Browse[1]> control$max.it
[1] 50
Browse[1]> c.psi
[1] 4.685061
Browse[1]> c
## fourth level
b <- .C("R_lmrob_MM", x = as.double(x), y = as.double(y), n =
as.integer(n),
p = as.integer(p), beta.initial = as.double(beta.initial),
scale = as.double(scale), coef = double(p), iter =
as.integer(control$max.it),
c.psi = c.psi, converged = logical(1), PACKAGE =
"robustbase")[c("coef",
"scale", "converged", "iter")]
Warning messages:
1: rwls(): not converged in 1000 lambda iterations
2: rwls(): not converged in 1000 lambda iterations
3: rwls(): not converged in 1000 lambda iterations
4: rwls(): not converged in 1000 lambda iterations
Everything works fine with my R, except that I cannot use successfully the
package debug since I have updated R to version 2.5.0. Since then,
Yes, IIRC this was due to a bug in 2.5.0. Install a patched version and everything should be fine.
mtrace(fun) exits with the error message "Error in all.levs[[j]] : subscript out of bounds" with functions I have tested in former versions of R without any problems! But that's another story. By the way: Before I update R, I remove all the packages installed and install the latest versions after updating R
If you have your packages in the exact same location as before, `update.packages(checkBuilt = TRUE)' will make sure that you get packages compiled for the updated R (given that these still builds under the newer R version). HTH, Henric
I hope this helps. I am afraid that my problem is platform dependent. Kind regards Ren? Ren? Locher E-Mail: rene.locher at zhwin.ch Institut f?r Datenanalyse und Prozessdesign Tel: 052/ 267 7810 Z?rcher Hochschule Winterthur Fax: 052/ 268 7810 Technopark / J?gerstrasse 2 Postfach CH-8400 Winterthur http://www.idp.zhwin.ch |-----Original Message----- |From: Martin Maechler [mailto:maechler at stat.math.ethz.ch] |Sent: Friday, June 08, 2007 9:01 AM |To: Matias Salibian-Barrera |Cc: r-sig-robust at r-project.org; Locher Ren? (lor); Martin Maechler |Subject: Re: [RsR] lmrob: lmrob.S()-Warning is not in the |result returned | | | MS> However, *I can't* reproduce Rene's second warning: "rwls(): not | MS> converged in 1000 lambda iterations" warning. I will |look into it a bit | MS> further. | |indeed, and I can't either - carefully checking a 2nd time. | |Rene, maybe you can try to use debug(.) and |see the exact lmrob.S(.) call which leads to the lambda |iteration warnings. | | MS> Matias | MS> | MS> > version | MS> _ | MS> platform i686-pc-linux-gnu | MS> arch i686 | MS> os linux-gnu | MS> system i686, linux-gnu | MS> status | MS> major 2 | MS> minor 3.1 | MS> year 2006 | MS> month 06 | MS> day 01 | MS> svn rev 38247 | MS> language R | MS> version.string Version 2.3.1 (2006-06-01) | MS> > library(robustbase) | MS> > test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, | MS> + 3.044522,3.660994), | MS> + dist=c(100,180,280,30,220,6)) | MS> > res <- lmrob(lconc~dist, dat=test) | MS> Warning messages: | MS> 1: lmrob.S(): refinements did not converge (to |tol=1e-07) in 200 iterations | MS> 2: lmrob.S(): refinements did not converge (to |tol=1e-07) in 200 iterations | MS> > my.ctrl <- lmrob.control(refine.tol=1e-5) | MS> > res2 <- lmrob(lconc~dist, dat=test, control=my.ctrl) | MS> > res | MS> | MS> Call: | MS> lmrob(formula = lconc ~ dist, data = test) | MS> | MS> Coefficients: | MS> (Intercept) dist | MS> 3.690387 -0.003707 | MS> | MS> > res2 | MS> | MS> Call: | MS> lmrob(formula = lconc ~ dist, data = test, control = my.ctrl) | MS> | MS> Coefficients: | MS> (Intercept) dist | MS> 3.690387 -0.003707 | MS> | MS> > res$scale | MS> [1] 0.2506454 | MS> > res2$scale | MS> [1] 0.2506544 | | Martin Maechler wrote: | >>>>>> "ReneL" == Locher Ren? (lor) <lor at zhwin.ch> | >>>>>> on Tue, 5 Jun 2007 18:24:47 +0200 writes: | > | > ReneL> Dear Matias When I run the following code I get 2 | > ReneL> warnings: | > | > ReneL> lmrob.S(): refinements did not converge |(tol=1e-07) in 200 iterations | > | > library(robustbase) | > test <- data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, | > 3.044522,3.660994), | > dist=c(100,180,280,30,220,6)) | > res <- lmrob(lconc~dist, dat=test) | > | > ReneL> res$converged gives TRUE as the IRWLS iterations |after the lmrob.S() have converged. | > | > ReneL> It would be nice to have also the convergence |status of lmrob.S() in the result object of lmrob(). | > | > I agree. | > | > HOWEVER, I cannot see / reproduce the convergence warnings | > problems you mention, neither the above, nor the one you sent | > yesterday. | > | > Are you *REALLY* sure, you are not using an older version of | > "robustbase" or mixing versions of robustbase, | > or are using 'lmrob' (there was a package of that name) and | > 'robustbase' simultaneously? | > | > Note: For such reports, do use sessionInfo(). | > | > Regards, | > Martin | > | > ReneL> Kind regards | > | > ReneL> Ren? | > | > | > ReneL> Ren? Locher |E-Mail: rene.locher at zhwin.ch | > ReneL> Institut f?r Datenanalyse und Prozessdesign |Tel: 052/ 267 7810 | > ReneL> Z?rcher Hochschule Winterthur |Fax: 052/ 268 7810 | > ReneL> Technopark / J?gerstrasse 2 | > ReneL> Postfach | > ReneL> CH-8400 Winterthur |http://www.idp.zhwin.ch | > | > ReneL> P.S. | > | > ReneL> Here is the version of my system on which I have |tested the example: | > | > ReneL> version _ | > ReneL> ## platform i386-pc-mingw32 | > ReneL> ## arch i386 | > ReneL> ## os mingw32 | > ReneL> ## system i386, mingw32 | > ReneL> ## status | > ReneL> ## major 2 | > ReneL> ## minor 5.0 | > ReneL> ## year 2007 | > ReneL> ## month 04 | > ReneL> ## day 23 | > ReneL> ## svn rev 41293 | > ReneL> ## language R | > ReneL> ## version.string R version 2.5.0 (2007-04-23) | > | > ReneL> library(help=robustbase) | > ReneL> ## Version: 0.2-7 | | | | -- | _____________________________________________________ | Matias Salibian-Barrera - Department of Statistics | The University of British Columbia | Phone: (604) 822-3410 - Fax: (604) 822-6960 | "The plural of anecdote is not data" (George Stigler?) | | | | >>>>> ">>" == Matias Salibian-Barrera <matias at stat.ubc.ca> | >>>>> on Thu, 07 Jun 2007 09:35:46 -0700 writes: | | >>> Thanks Rene for pointing these problems out. | | >>> I can reproduce the first warning (produced by | >>> lmrob.S()) -- I'm copying my output below. Of course, | >>> the warning disappears if you weaken the convergence | >>> criteria a little: | | >>> my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- | >>> lmrob(lconc~dist, dat=test, control=my.ctrl) | | >>> However, *I can't* reproduce Rene's second warning: | >>> "rwls(): not converged in 1000 lambda iterations" | >>> warning. I will look into it a bit further. | | >>> Matias | | | | >> version | >>> _ platform i686-pc-linux-gnu arch i686 os | >>> linux-gnu system i686, linux-gnu status major 2 minor | >>> 3.1 year 2006 month 06 day 01 svn rev 38247 language R | >>> version.string Version 2.3.1 (2006-06-01) | >> library(robustbase) test <- | >> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, | >>> + 3.044522,3.660994), + dist=c(100,180,280,30,220,6)) | >> res <- lmrob(lconc~dist, dat=test) | >>> Warning messages: 1: lmrob.S(): refinements did not | >>> converge (to tol=1e-07) in 200 iterations 2: lmrob.S(): | >>> refinements did not converge (to tol=1e-07) in 200 | >>> iterations | >> my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- | >> lmrob(lconc~dist, dat=test, control=my.ctrl) res | | >>> Call: lmrob(formula = lconc ~ dist, data = test) | | >>> Coefficients: (Intercept) dist 3.690387 -0.003707 | | >> res2 | | >>> Call: lmrob(formula = lconc ~ dist, data = test, control | >>> = my.ctrl) | | >>> Coefficients: (Intercept) dist 3.690387 -0.003707 | | >> res$scale | >>> [1] 0.2506454 | >> res2$scale | >>> [1] 0.2506544 | | | | >>> Martin Maechler wrote: | >>>>>>> "ReneL" == Locher Ren? (lor) <lor at zhwin.ch> on Tue, | >>>>>>> 5 Jun 2007 18:24:47 +0200 writes: | >> | ReneL> Dear Matias When I run the following code I get 2 | ReneL> warnings: | >> | ReneL> lmrob.S(): refinements did not converge (tol=1e-07) | ReneL> in 200 iterations | >> | >> library(robustbase) test <- | >> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, | >> 3.044522,3.660994), dist=c(100,180,280,30,220,6)) res <- | >> lmrob(lconc~dist, dat=test) | >> | ReneL> res$converged gives TRUE as the IRWLS iterations | ReneL> after the lmrob.S() have converged. | >> | ReneL> It would be nice to have also the convergence status | ReneL> of lmrob.S() in the result object of lmrob(). | >> | >> I agree. | >> | >> HOWEVER, I cannot see / reproduce the convergence | >> warnings problems you mention, neither the above, nor the | >> one you sent yesterday. | >> | >> Are you *REALLY* sure, you are not using an older version | >> of "robustbase" or mixing versions of robustbase, or are | >> using 'lmrob' (there was a package of that name) and | >> 'robustbase' simultaneously? | >> | >> Note: For such reports, do use sessionInfo(). | |
_______________________________________________ R-SIG-Robust at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-robust
1 day later
Thanks a lot Henric, so I think it's definitely platform dependent. (you see it on one version of R, not on the other -- i.e. the use of a different compiler / library suite will most probably be the reason) In the mean time, I found that I can reproduce the problem on my notebook using an uptodate version of Ubuntu. That's good news insofar as I now can test things much more easily. Martin
"HenricN" == Henric Nilsson (Public) <nilsson.henric at gmail.com>
on Fri, 8 Jun 2007 12:47:27 +0200 (CEST) writes:
HenricN> Den Fr, 2007-06-08, 11:21 skrev Locher Ren? (lor):
>> Ciao Martin
>>
>> I had started R freshly to run my example. Here the full
>> output (without start-up message):
>>
>>> options(STERM='iESS', editor='gnuclient.exe')
>>> library(robustbase) test <- data.frame(lconc =
>>> log(c(29.5, 40.1, 21.1, 25.3, 27.3, 25.2,
>> + 26.9, 19.1, 16.4)), + dist = c(520, 1480, 1780, 740,
>> 540, 1050, 1100, + 1640, 1860))
>>>
>>> res <- lmrob(lconc~dist, dat=test)
>> Warning messages: 1: rwls(): not converged in 1000 lambda
>> iterations 2: rwls(): not converged in 1000 lambda
>> iterations 3: rwls(): not converged in 1000 lambda
>> iterations 4: rwls(): not converged in 1000 lambda
>> iterations
>>>
I can confirm this as well using
>> sessionInfo()
HenricN> R version 2.5.0 Patched (2007-05-24 r41696)
HenricN> i386-pc-mingw32
HenricN> locale: LC_COLLATE=English_United
HenricN> States.1252;LC_CTYPE=English_United
HenricN> States.1252;LC_MONETARY=English_United
HenricN> States.1252;LC_NUMERIC=C;LC_TIME=English_United
HenricN> States.1252
HenricN> attached base packages: [1] "stats" "graphics"
HenricN> "grDevices" "utils" "datasets" "methods" [7] "base"
HenricN> other attached packages: robustbase "0.2-7"
HenricN> However, I don't see the problem under
>> sessionInfo()
HenricN> R version 2.4.1 Patched (2007-03-15 r40854)
HenricN> i386-pc-mingw32
HenricN> locale: LC_COLLATE=English_United
HenricN> States.1252;LC_CTYPE=English_United
HenricN> States.1252;LC_MONETARY=English_United
HenricN> States.1252;LC_NUMERIC=C;LC_TIME=English_United
HenricN> States.1252
HenricN> attached base packages: [1] "stats" "graphics"
HenricN> "grDevices" "utils" "datasets" "methods" "base"
HenricN> other attached packages: robustbase "0.2-7"
HenricN> And when comparing e.g. `res$fitted.values' between
HenricN> these two R versions, they seem identical.
>>
>>
>> And her my sessionInfo right afterwards:
>>> sessionInfo()
>> R version 2.5.0 (2007-04-23) i386-pc-mingw32
>>
>> locale:
>> LC_COLLATE=German_Switzerland.1252;LC_CTYPE=German_Switzerland.1252;LC_MONETARY=German_Switzerland.1252;LC_NUMERIC=C;LC_TIME=German_Switzerland.1252
>>
>> attached base packages: [1] "stats" "graphics"
>> "grDevices" "utils" "datasets" "methods" [7] "base"
>>
>> other attached packages: robustbase "0.2-7"
>>
>> And here is the output in debugging mode. I hope this
>> helps.
>>
>> debug(lmrob) debug(lmrob.fit.MM) debug(lmrob.MM)
>>
>> ## first level lmrob(lconc~dist, dat=test) Browse[1]>c
>>
>> ## second level z <- lmrob.fit.MM(x, y, control =
>> control) Browse[1]>c
>>
>> ## third level final.MM <- lmrob.MM(x = x, y = y,
>> beta.initial = iCoef, scale = init.S$scale, control =
>> control)
>>
>> Browse[1]>n ## repeated until call to .C()
>>
>> ## arguments just before the call to fourth level
>> Browse[1]> x (Intercept) dist 1 1 520 2 1 1480 3 1 1780 4
>> 1 740 5 1 540 6 1 1050 7 1 1100 8 1 1640 9 1 1860
>> attr(,"assign") [1] 0 1 Browse[1]> y 1 2 3 4 5 6 7 8
>> 3.384390 3.691376 3.049273 3.230804 3.306887 3.226844
>> 3.292126 2.949688 9 2.797281 Browse[1]> print(n) [1] 9
>> Browse[1]> p [1] 2 Browse[1]> control$max.it [1] 50
>> Browse[1]> c.psi [1] 4.685061 Browse[1]> c
>>
>> ## fourth level b <- .C("R_lmrob_MM", x = as.double(x), y
>> = as.double(y), n = as.integer(n), p = as.integer(p),
>> beta.initial = as.double(beta.initial), scale =
>> as.double(scale), coef = double(p), iter =
>> as.integer(control$max.it), c.psi = c.psi, converged =
>> logical(1), PACKAGE = "robustbase")[c("coef", "scale",
>> "converged", "iter")] Warning messages: 1: rwls(): not
>> converged in 1000 lambda iterations 2: rwls(): not
>> converged in 1000 lambda iterations 3: rwls(): not
>> converged in 1000 lambda iterations 4: rwls(): not
>> converged in 1000 lambda iterations
>>
>> Everything works fine with my R, except that I cannot use
>> successfully the package debug since I have updated R to
>> version 2.5.0. Since then,
HenricN> Yes, IIRC this was due to a bug in 2.5.0. Install a
HenricN> patched version and everything should be fine.
>> mtrace(fun) exits with the error message "Error in
>> all.levs[[j]] : subscript out of bounds" with functions I
>> have tested in former versions of R without any problems!
>> But that's another story. By the way: Before I update R,
>> I remove all the packages installed and install the
>> latest versions after updating R
HenricN> If you have your packages in the exact same
HenricN> location as before, `update.packages(checkBuilt =
HenricN> TRUE)' will make sure that you get packages
HenricN> compiled for the updated R (given that these still
HenricN> builds under the newer R version).
HenricN> HTH, Henric
>>
>> I hope this helps. I am afraid that my problem is
>> platform dependent.
>>
>> Kind regards
>>
>> Ren?
>>
>> Ren? Locher E-Mail: rene.locher at zhwin.ch Institut f?r
>> Datenanalyse und Prozessdesign Tel: 052/ 267 7810 Z?rcher
>> Hochschule Winterthur Fax: 052/ 268 7810 Technopark /
>> J?gerstrasse 2 Postfach CH-8400 Winterthur
>> http://www.idp.zhwin.ch
>>
>>
>>
>>
>> |-----Original Message----- |From: Martin Maechler
>> [mailto:maechler at stat.math.ethz.ch] |Sent: Friday, June
>> 08, 2007 9:01 AM |To: Matias Salibian-Barrera |Cc:
>> r-sig-robust at r-project.org; Locher Ren? (lor); Martin
>> Maechler |Subject: Re: [RsR] lmrob: lmrob.S()-Warning is
>> not in the |result returned
>> |
>> |
>> | MS> However, *I can't* reproduce Rene's second warning:
>> "rwls(): not | MS> converged in 1000 lambda iterations"
>> warning. I will |look into it a bit | MS> further.
>> |
>> |indeed, and I can't either - carefully checking a 2nd
>> time.
>> |
>> |Rene, maybe you can try to use debug(.) and |see the
>> exact lmrob.S(.) call which leads to the lambda
>> |iteration warnings.
>> |
>> | MS> Matias | MS> | MS> > version | MS> _ | MS> platform
>> i686-pc-linux-gnu | MS> arch i686 | MS> os linux-gnu |
>> MS> system i686, linux-gnu | MS> status | MS> major 2 |
>> MS> minor 3.1 | MS> year 2006 | MS> month 06 | MS> day 01
>> | MS> svn rev 38247 | MS> language R | MS> version.string
>> Version 2.3.1 (2006-06-01) | MS> > library(robustbase) |
>> MS> > test <-
>> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, |
>> MS> + 3.044522,3.660994), | MS> +
>> dist=c(100,180,280,30,220,6)) | MS> > res <-
>> lmrob(lconc~dist, dat=test) | MS> Warning messages: | MS>
>> 1: lmrob.S(): refinements did not converge (to
>> |tol=1e-07) in 200 iterations | MS> 2: lmrob.S():
>> refinements did not converge (to |tol=1e-07) in 200
>> iterations | MS> > my.ctrl <-
>> lmrob.control(refine.tol=1e-5) | MS> > res2 <-
>> lmrob(lconc~dist, dat=test, control=my.ctrl) | MS> > res
>> | MS> | MS> Call: | MS> lmrob(formula = lconc ~ dist,
>> data = test) | MS> | MS> Coefficients: | MS> (Intercept)
>> dist | MS> 3.690387 -0.003707 | MS> | MS> > res2 | MS> |
>> MS> Call: | MS> lmrob(formula = lconc ~ dist, data =
>> test, control = my.ctrl) | MS> | MS> Coefficients: | MS>
>> (Intercept) dist | MS> 3.690387 -0.003707 | MS> | MS> >
>> res$scale | MS> [1] 0.2506454 | MS> > res2$scale | MS>
>> [1] 0.2506544
>> |
>> | Martin Maechler wrote: | >>>>>> "ReneL" == Locher Ren?
>> (lor) <lor at zhwin.ch> | >>>>>> on Tue, 5 Jun 2007 18:24:47
>> +0200 writes:
>> | >
>> | > ReneL> Dear Matias When I run the following code I
>> get 2 | > ReneL> warnings:
>> | >
>> | > ReneL> lmrob.S(): refinements did not converge
>> |(tol=1e-07) in 200 iterations
>> | >
>> | > library(robustbase) | > test <-
>> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, |
>> > 3.044522,3.660994), | > dist=c(100,180,280,30,220,6)) |
>> > res <- lmrob(lconc~dist, dat=test)
>> | >
>> | > ReneL> res$converged gives TRUE as the IRWLS
>> iterations |after the lmrob.S() have converged.
>> | >
>> | > ReneL> It would be nice to have also the convergence
>> |status of lmrob.S() in the result object of lmrob().
>> | >
>> | > I agree.
>> | >
>> | > HOWEVER, I cannot see / reproduce the convergence
>> warnings | > problems you mention, neither the above, nor
>> the one you sent | > yesterday.
>> | >
>> | > Are you *REALLY* sure, you are not using an older
>> version of | > "robustbase" or mixing versions of
>> robustbase, | > or are using 'lmrob' (there was a package
>> of that name) and | > 'robustbase' simultaneously?
>> | >
>> | > Note: For such reports, do use sessionInfo().
>> | >
>> | > Regards, | > Martin
>> | >
>> | > ReneL> Kind regards
>> | >
>> | > ReneL> Ren?
>> | >
>> | >
>> | > ReneL> Ren? Locher |E-Mail: rene.locher at zhwin.ch | >
>> ReneL> Institut f?r Datenanalyse und Prozessdesign |Tel:
>> 052/ 267 7810 | > ReneL> Z?rcher Hochschule Winterthur
>> |Fax: 052/ 268 7810 | > ReneL> Technopark / J?gerstrasse
>> 2 | > ReneL> Postfach | > ReneL> CH-8400 Winterthur
>> |http://www.idp.zhwin.ch
>> | >
>> | > ReneL> P.S.
>> | >
>> | > ReneL> Here is the version of my system on which I
>> have |tested the example:
>> | >
>> | > ReneL> version _ | > ReneL> ## platform
>> i386-pc-mingw32 | > ReneL> ## arch i386 | > ReneL> ## os
>> mingw32 | > ReneL> ## system i386, mingw32 | > ReneL> ##
>> status | > ReneL> ## major 2 | > ReneL> ## minor 5.0 | >
>> ReneL> ## year 2007 | > ReneL> ## month 04 | > ReneL> ##
>> day 23 | > ReneL> ## svn rev 41293 | > ReneL> ## language
>> R | > ReneL> ## version.string R version 2.5.0
>> (2007-04-23)
>> | >
>> | > ReneL> library(help=robustbase) | > ReneL> ##
>> Version: 0.2-7
>> |
>> |
>> |
>> | --
>> | _____________________________________________________ |
>> Matias Salibian-Barrera - Department of Statistics | The
>> University of British Columbia | Phone: (604) 822-3410 -
>> Fax: (604) 822-6960 | "The plural of anecdote is not
>> data" (George Stigler?)
>> |
>> |
>> |
>> | >>>>> ">>" == Matias Salibian-Barrera
>> <matias at stat.ubc.ca> | >>>>> on Thu, 07 Jun 2007 09:35:46
>> -0700 writes:
>> |
>> | >>> Thanks Rene for pointing these problems out.
>> |
>> | >>> I can reproduce the first warning (produced by |
>> >>> lmrob.S()) -- I'm copying my output below. Of course,
>> | >>> the warning disappears if you weaken the
>> convergence | >>> criteria a little:
>> |
>> | >>> my.ctrl <- lmrob.control(refine.tol=1e-5) res2 <- |
>> >>> lmrob(lconc~dist, dat=test, control=my.ctrl)
>> |
>> | >>> However, *I can't* reproduce Rene's second warning:
>> | >>> "rwls(): not converged in 1000 lambda iterations" |
>> >>> warning. I will look into it a bit further.
>> |
>> | >>> Matias
>> |
>> |
>> |
>> | >> version | >>> _ platform i686-pc-linux-gnu arch i686
>> os | >>> linux-gnu system i686, linux-gnu status major 2
>> minor | >>> 3.1 year 2006 month 06 day 01 svn rev 38247
>> language R | >>> version.string Version 2.3.1
>> (2006-06-01) | >> library(robustbase) test <- | >>
>> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, |
>> >>> + 3.044522,3.660994), + dist=c(100,180,280,30,220,6))
>> | >> res <- lmrob(lconc~dist, dat=test) | >>> Warning
>> messages: 1: lmrob.S(): refinements did not | >>>
>> converge (to tol=1e-07) in 200 iterations 2: lmrob.S(): |
>> >>> refinements did not converge (to tol=1e-07) in 200 |
>> >>> iterations | >> my.ctrl <-
>> lmrob.control(refine.tol=1e-5) res2 <- | >>
>> lmrob(lconc~dist, dat=test, control=my.ctrl) res
>> |
>> | >>> Call: lmrob(formula = lconc ~ dist, data = test)
>> |
>> | >>> Coefficients: (Intercept) dist 3.690387 -0.003707
>> |
>> | >> res2
>> |
>> | >>> Call: lmrob(formula = lconc ~ dist, data = test,
>> control | >>> = my.ctrl)
>> |
>> | >>> Coefficients: (Intercept) dist 3.690387 -0.003707
>> |
>> | >> res$scale | >>> [1] 0.2506454 | >> res2$scale | >>>
>> [1] 0.2506544
>> |
>> |
>> |
>> | >>> Martin Maechler wrote: | >>>>>>> "ReneL" == Locher
>> Ren? (lor) <lor at zhwin.ch> on Tue, | >>>>>>> 5 Jun 2007
>> 18:24:47 +0200 writes:
>> | >>
>> | ReneL> Dear Matias When I run the following code I get
>> 2 | ReneL> warnings:
>> | >>
>> | ReneL> lmrob.S(): refinements did not converge
>> (tol=1e-07) | ReneL> in 200 iterations
>> | >>
>> | >> library(robustbase) test <- | >>
>> data.frame(lconc=c(3.081910,3.165475,2.501436,3.650658, |
>> >> 3.044522,3.660994), dist=c(100,180,280,30,220,6)) res
>> <- | >> lmrob(lconc~dist, dat=test)
>> | >>
>> | ReneL> res$converged gives TRUE as the IRWLS iterations
>> | ReneL> after the lmrob.S() have converged.
>> | >>
>> | ReneL> It would be nice to have also the convergence
>> status | ReneL> of lmrob.S() in the result object of
>> lmrob().
>> | >>
>> | >> I agree.
>> | >>
>> | >> HOWEVER, I cannot see / reproduce the convergence |
>> >> warnings problems you mention, neither the above, nor
>> the | >> one you sent yesterday.
>> | >>
>> | >> Are you *REALLY* sure, you are not using an older
>> version | >> of "robustbase" or mixing versions of
>> robustbase, or are | >> using 'lmrob' (there was a
>> package of that name) and | >> 'robustbase'
>> simultaneously?
>> | >>
>> | >> Note: For such reports, do use sessionInfo().
>> |
>> |
>>
>> _______________________________________________
>> R-SIG-Robust at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-robust
>>
>>
_______________________________________________
HenricN> R-SIG-Robust at r-project.org mailing list
HenricN> https://stat.ethz.ch/mailman/listinfo/r-sig-robust