Hi Priya,
Presumably you are calling arima.sim from your function x.black.
Since you did not give this function, I can't tell what your problem
is. I would think that your best bet is to find a resample for
which the post-blackening step is not working and then try to debug
x.black. The problem is not with tsboot since that function
does not call arima.sim at all.
------------------------------------------------------------------
| Angelo J. Canty Email: cantya@mcmaster.ca |
| Mathematics and Statistics Phone: (905) 525-9140 x 27079 |
| McMaster University Fax : (905) 522-0935 |
| 1280 Main St. W. |
| Hamilton ON L8S 4K1 |
------------------------------------------------------------------
On Mon, 17 Feb 2003, Priya Kulkarni wrote:
>
>
> Hi,
>
> I have simulated 100 time series from ARMA(1,1).
>
> For each, I have fitted two AR models - one with AIC AR-order and the other
> with 2*AIC AR-order. Later I am generating 99 bootstrap samples from each
> model.
>
> Here X is a 100*64 data matrix (where 64 is the size of each data series and
> the resample).
>
> When I fit the first model as follows, everything works perfectly.
>
> for (i in 1:N){
> .......
>
> x.1<-ar(X[i,],order.max=25)
> x.1model<-list(order=c(x.1$order,0,0),ar=x.1$ar)
> x.1res<-x.1$resid[!is.na(x.1$resid)]
> x.1res<-x.1res-mean(x.1res
>
> x.1<-tsboot(x.1res,x.fun,R=99,l=4,sim="fixed",ran.gen=x.black,ran.args=list(ts=X
> [i,],model=x.1model),n.sim=length(X[i,]))
>
> .......
> }
>
>
> Next, for the second model:
>
> for (i in 1:N){
> ........
>
> x.1<-ar(X[i,],order.max=25)
> p[i,]<-min(25,2*x.1$order)
> x.2<-ar(X[i,],aic=F,order.max=p[i,])
> x.2model<-list(order=c(x.2$order,0,0),ar=x.2$ar)
> x.2res<-x.2$resid[!is.na(x.2$resid)]
> x.2res<-x.2res-mean(x.2res)
>
> x.2<-tsboot(x.2res,x.fun,R=99,l=4,sim="fixed",ran.gen=x.black,ran.args=list(ts=X
> [i,],model=x.2model),n.sim=length(X[i,]))
> .......
> }
>
> the for-loop terminates the program before going through all N values giving
> the following error :
>
> Error in .C("S_arimasim",: Could not invert cov: 18
> Dumped
> Error was while calling subroutine "S_arimasim"
>
>
> Sometimes it goes over 90+ values (but <100) but most of the times it stops
> quite early (ranging from N=5 to N=40) and I am totally at loss as to why this
> happens. It looks like the problem is in 'arima.sim' and not in 'tsboot'.
>
> Has anyone seen this problem before?
>
> All suggestions and ideas are welcome!
>
> Thanks,
> Priya
>
> --------------------------------------------------------------------
> This message was distributed by s-news@lists.biostat.wustl.edu. To
> unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
> the BODY of the message: unsubscribe s-news
>
|