在这一方面,我找到很多有书看,同你有同感;
在R中我的抄几个程序给你,我用数据试过了,可行的。
>library(TSA )
>data(spots)
> pvaluem=NULL
> for (d in 1:5)
+ {res=tlrt(sqrt(spots),p=5,d=d,a=0.25,b=0.75); pvaluem=
+ cbind(pvaluem,c(d,res$test.statistic,res$p.value))}
> rownames(pvaluem)=c('d','test statistic','p-value')
> round(pvaluem,3)
[,1] [,2] [,3] [,4] [,5]
d 1.000 2.000 3.000 4.000 5.00
test statistic 46.897 111.341 99.058 84.962 45.12
p-value 0.000 0.000 0.000 0.000 0.00
还有一种程序如下;
>ibrary(TSA )
> AICM=NULL
> for(d in 1:4)
+ {predator.tar=tar(y=sqrt(spots),p1=4,p2=4,d=d,a=.1,b=.9)
>AICM=rbind(AICM, c(d, predator.tar$AIC,signif(ptrdator.tar$thd,4),
+predator.tar$p1,predator.tar$p2))}
> colnames(AICM)=c('d','nominal AIC','r','p1','p2')
> rownames(AICM)=NULL
>AICM
d nominal AIC r p1 p2
[1,] 1 155.8 5.882 2 4
[2,] 2 113.7 6.058 3 4[4,] 4 132.5 8.044 3 4
[3,] 3 130.2 6.595 2 4
这二个程序够你用的,无私给你参考,


雷达卡




京公网安备 11010802022788号







