[RsR] lmrob: lmrob.S()-Warning is not in the result returned
Martin Maechler
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Fri Jun 8 09:00:40 CEST 2007
>>>>> "MS" == Matias Salibian-Barrera <matias using 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 using 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 using 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 using 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 using 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().
More information about the R-SIG-Robust
mailing list