[Highfrequency-commits] r26 - pkg/highfrequency/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jul 23 18:17:41 CEST 2012


Author: jonathan
Date: 2012-07-23 18:17:40 +0200 (Mon, 23 Jul 2012)
New Revision: 26

Modified:
   pkg/highfrequency/R/realized.R
Log:
fixed the bugfix harModel

Modified: pkg/highfrequency/R/realized.R
===================================================================
--- pkg/highfrequency/R/realized.R	2012-07-21 20:45:12 UTC (rev 25)
+++ pkg/highfrequency/R/realized.R	2012-07-23 16:17:40 UTC (rev 26)
@@ -1845,7 +1845,7 @@
     } #End HAR-RV if cond
     
     if( type == "HARRVJ" ){   
-        if(transform=="log"){ J = J + 1; }
+        if(!is.null(transform) && transform=="log"){ J = J + 1; }
         J = J[(maxp:(n-h)),]; 
         x = cbind(x1,J);              # bind jumps to RV data 
         if(!is.null(transform)){ y = Ftransform(y); x = Ftransform(x); }       
@@ -1876,7 +1876,7 @@
         # subset again:
         Cmatrix <- Cmatrix[(maxp:(n-h)),];
         Jmatrix <- Jmatrix[(maxp:(n-h)),];   
-        if(transform=="log"){ Jmatrix = Jmatrix + 1 }
+        if(!is.null(transform) && transform=="log"){ Jmatrix = Jmatrix + 1 }
         
         x = cbind(Cmatrix,Jmatrix);               # bind jumps to RV data      
         if(!is.null(transform)){ y = Ftransform(y); x = Ftransform(x); }  



More information about the Highfrequency-commits mailing list