[RsR] number of subsamples in robustbase::lmrob.S()

Kaveh Vakili k@veh@v@k||| @end|ng |rom w|@@ku|euven@be
Wed May 1 21:20:57 CEST 2013


Oh, Ok, thanks Manuel!
Sorry for having missed that out,

Best,
Kaveh

On 05/01/2013 05:32 PM, Manuel Koller wrote:
> Dear Kaveh,
>
> mts sets just the number of samples the algorithm tries before giving up finding a nonsingular subsample (if simple subsampling is used).
> nResample is the parameter you want.
>
> Best,
>
> Manuel
>
> On 1. May 2013, at 13:11 , Kaveh Vakili <kaveh.vakili using wis.kuleuven.be> wrote:
>
>> Dear All,
>>
>> I'm trying to estimate the same model
>> twice using the FastS with a varying
>> # of ('simple') sub-samples.
>>
>> The man page for lmrob.control() defines
>> an option 'mts' which seems to be what I
>> want:
>>
>> mts maximum number of samples to try in subsampling algorithm.
>>
>> However, when trying on a dataset:
>>
>> library(robustbase)
>> #my data:
>> n<-500
>> p<-10
>> x0<-matrix(rnorm(n*(p-1)),nc=p-1)
>> y0<-rnorm(n)
>>
>> s1<-lmrob.control()
>> s1$subsampling<-"simple"
>> s1$max.it<-500
>> s1$k.max<-500
>> s1$maxit.scale<-500
>>
>> #\# subsamples?
>> s1$mts<-10000
>> system.time(lmrob.S(x=cbind(1,x0),y=y0,control=s1))
>>   user  system elapsed
>>   0.084   0.000   0.081
>> #\# subsamples?
>> s1$mts<-100
>> system.time(lmrob.S(x=cbind(1,x0),y=y0,control=s1))
>>   user  system elapsed
>>   0.076   0.000   0.077
>>
>>
>> I find that the two timing are very close...I suspect
>> they both use a similar number of starting p-subsets
>> (and that I set the options in lmrob.control() wrongly).
>>
>> How can I check how many starting p-subsets were used
>> in each estimations?
>>
>> Best regards,
>>
>> _______________________________________________
>> R-SIG-Robust using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-robust




More information about the R-SIG-Robust mailing list