[RsR] number of subsamples in robustbase::lmrob.S()
Kaveh Vakili
k@veh@v@k||| @end|ng |rom w|@@ku|euven@be
Wed May 1 13:11:20 CEST 2013
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,
More information about the R-SIG-Robust
mailing list