Displaying 2 results from an estimated 2 matches for "harrvcj".
2012 Jul 19
1
Change log(J) to log(J+1) to stop log(0) from occurring in harModel
...It is not my code and I make no claim to other's good work, and apologize if
I should even be posting it I am not sure, but in the transform function it
allows to change the model to `log` or `sqrt`, but when then model is
changed to log and the model used is either "HARRVJ" or "HARRVCJ" it will
return the following error:
x = harModel(dat, periods = c(1,5,22), periodsJ=c(1), RVest =
c("RCov","RBPCov"),
+ type="HARRVJ", h=22, transform="log") ; # Estimate ....
[TRUNCATED]
Error in lm.fit(x, y, offset = offset, singular....
2012 Jul 19
1
Switching log(J) to log(J+1) to avoid log(0) in HAR-RVJ model
...x,rmin);
model = estimhar(y=y,x=x);
model$transform = transform; model$h = h; model$type = "HARRVJ";
model$dates = alldates[(maxp+h):n];
class(model) = c("harModel","lm");
return( model )
}#End HAR-RV-J if cond
and this
if( type == "HARRVCJ" ){
# Are the jumps significant? if not set to zero:
if( jumptest=="ABDJumptest" ){
TQ = apply.daily(data, TQfun);
J = J[,1];
teststats = ABDJumptest(RV=RM1,BPV=RM2,TQ=TQ );
}else{ jtest = match.fun(jumptest); teststats = jtest(data,...) }...