From d575270bae50e0c10886fe366b75de1fa15511a7 Mon Sep 17 00:00:00 2001 From: mxmehl Date: Thu, 26 Feb 2015 01:27:40 +0100 Subject: [PATCH] adding some tests with VAR, still to improve --- issuecomp-3-calc.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/issuecomp-3-calc.R b/issuecomp-3-calc.R index c6535ed..584382c 100644 --- a/issuecomp-3-calc.R +++ b/issuecomp-3-calc.R @@ -74,6 +74,16 @@ g1 <- ggplot(data = stats_entropy, aes(x=date,y=value,colour=variable, group=var geom_smooth(size=1,formula = y ~ x, method="loess", se=FALSE, color=1) g1 + + +# VAR --------------------------------------------------------------------- + +test <- VAR(issues[,2:32], p=3, type=c("const", "trend", "both", "none"), season=NULL, exogen = NULL, lag.max = NULL, ic = c("AIC", "HQ", "SC", "FPE")) +VAR(issues_s[,2:11], p=1, type=c("const", "trend", "both", "none"), season=NULL, exogen = issues_i[2:22]) + +capture.output(print(summary(test), prmsd=TRUE, digits=1), file="out.txt") + + # SOME TESTS -------------------------------------------------------------- stats <- data.frame(date=drange)