Hi All
I'm trying to analyse currencies time series, and thus performing a cointegration heck, however i'm having troubles with the data as I presume it is due to market opening differences; The following piece of code that i'm using return a variable lengths problem
library(fImport);
JPY = fredSeries("DEXJPUS", source=NULL, frequency = "daily", from = 2004-01-04, to = Sys.timeDate(), nDaysBack = NULL);
CAD = fredSeries("DEXCAUS", source=NULL, frequency = "daily", from = 2004-01-04, to = Sys.timeDate(), nDaysBack = NULL);
bhp=log(JPY[,]);
vale=log(CAD[,]);
plot(bhp,type="l", col="blue", xlab="Time", ylab="Log Prices", ylim=c(-1,8))
lines(vale,type="l",col="red");
m1=lm(bhp~vale, drop.unused.levels = TRUE, na.action = na.exclude)
"Error in model.frame.default(formula = bhp ~ vale, na.action = na.exclude, :
variable lengths differ (found for 'vale')"
Hope somebody could help me with this issue
Regard Daniele
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://r.789695.n4.nabble.com/Error-variable-lengths-differ-tp3592163p3592163.html">Error: variable lengths differ</a><br/>
Sent from the <a href="http://r.789695.n4.nabble.com/datatable-help-f2315188.html">datatable-help mailing list archive</a> at Nabble.com.<br/>