urgent please, rolling window
Posted: Thu Jul 31, 2014 6:38 am
Dear all,
I am trying to do a rolling window for variance ratio test, and I read a lot of programming topics and I reached to following codes but it doesn't work, I got NA in all metrics, why??
I want to do rolling for MVR but with wildbootstrap probabilities, so my problem here is about test specification, Here you are codes, please help me clarify what is the problem
!width = 20
!lastfirst = @obsrange-!width+1
matrix(!lastfirst, 2) vratio
!doprob=0
!probchoice=0
!result =0
%problist ="default wildbootstrap"
%probOpt =""
!result = @uidialog("check",!doprob, "View prob options?")
if !result=-1 then 'if user cancelled, then stop program
stop
endif
if !doprob =1 then
!result = @uilist(!probChoice, "test specification probabilities ", %problist) ' put up prob dialog
if !result=-1 then 'if user cancelled, then stop program
stop
endif
if !probChoice = 2 then
%proOpt = "prob=wildbootstrap"
endif
endif
for !i=1 to !lastfirst
smpl @first+!i-1 @first+!i-1+!width-1
freeze(bb) R.vratio {%probOpt} 2 4 8 16
vratio(!i, 1) = @val(bb(11, 3))
vratio(!i, 2) = @val(bb(11, 5))
if (@isobject("bb")) then
delete bb
endif
next
I am trying to do a rolling window for variance ratio test, and I read a lot of programming topics and I reached to following codes but it doesn't work, I got NA in all metrics, why??
I want to do rolling for MVR but with wildbootstrap probabilities, so my problem here is about test specification, Here you are codes, please help me clarify what is the problem
!width = 20
!lastfirst = @obsrange-!width+1
matrix(!lastfirst, 2) vratio
!doprob=0
!probchoice=0
!result =0
%problist ="default wildbootstrap"
%probOpt =""
!result = @uidialog("check",!doprob, "View prob options?")
if !result=-1 then 'if user cancelled, then stop program
stop
endif
if !doprob =1 then
!result = @uilist(!probChoice, "test specification probabilities ", %problist) ' put up prob dialog
if !result=-1 then 'if user cancelled, then stop program
stop
endif
if !probChoice = 2 then
%proOpt = "prob=wildbootstrap"
endif
endif
for !i=1 to !lastfirst
smpl @first+!i-1 @first+!i-1+!width-1
freeze(bb) R.vratio {%probOpt} 2 4 8 16
vratio(!i, 1) = @val(bb(11, 3))
vratio(!i, 2) = @val(bb(11, 5))
if (@isobject("bb")) then
delete bb
endif
next