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
--
View this message in context:
http://r.789695.n4.nabble.com/Error-variable-lengths-differ-tp3592163p3592163.html
Sent from the datatable-help mailing list archive at Nabble.com._______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help