epoh 发表于 2012-5-26 15:21 
不需要载入package
只需要
source("estar_gscale.R")
哦,好的,我试了一下,可以估计!但是我想得到参数的t值和P值的统计量,在LSTAR模型中估计完以后利用“summary(mod)”就可以得到,那为什么这个估计ESTAR之后得到的我用“summary(mod)”得到的结果是这个呢?
> source("estar_gscale.R")
> new=read.table("zero.txt",header=TRUE)
> y=new$dy
> x=new$dx
> mod=estar(y,m=2,thVar=x)
Using maximum autoregressive order for low regime: mL = 2 
Using maximum autoregressive order for high regime: mH = 2 
Using only first 119 elements of thVar
Performing grid search for starting values...
Starting values fixed: gamma =  0.5 , th =  6.946 ; SSE =  56.08782 
Optimization algorithm converged
Optimized values fixed for regime 2  : gamma =  0.6174869 , th =  3.660855 
> summary(mod)
               Length Class       Mode   
str              8    nlar.struct list   
coefficients     8    -none-      numeric
fitted.values  119    -none-      numeric
residuals      119    -none-      numeric
k                1    -none-      numeric
model            7    data.frame  list   
model.specific  14    -none-      list   
epoh老师老麻烦您,我实在不好意思,确实是有点菜!谢谢您了!