Dear R experts,
 
I'm running the following stationary bootstrap programming to find the parameters estimate of a linear model:  
 
X<-runif(10,0,10)
Y<-2+3*X
a<-data.frame(X,Y)
coef<-function(fit){
  fit <- lm(Y~X,data=a)
   return(coef(fit))
}
 result<- tsboot(a,statistic=coef(fit),R = 10,n.sim = NROW(a),sim = "geom",orig.t = TRUE)
 
Unfortunately, I got this error message from R:
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
Can someone tells me what's wrong in the programming.
 
Thank you.
 
Regards,
Lim Hock Ann

	[[alternative HTML version deleted]]

