X-Git-Url: https://git.auder.net/?p=talweg.git;a=blobdiff_plain;f=data%2Fscripts%2Fbuild_testdata.R;fp=data%2Fscripts%2Fbuild_testdata.R;h=20cb725783e489be3b75a0c17fa7464184690160;hp=4c5978a25aac315df71bd8b92110e7e9324de2a3;hb=99f83c9af27492f6fb9b10f51fb8704ed588f5c1;hpb=defcae035f2e26fd8568cedb27040b173811b246 diff --git a/data/scripts/build_testdata.R b/data/scripts/build_testdata.R index 4c5978a..20cb725 100644 --- a/data/scripts/build_testdata.R +++ b/data/scripts/build_testdata.R @@ -5,9 +5,9 @@ times = strftime( seq( to=ISOdatetime(2007,7,2,0,0,0,tz="GMT"), by="hour"), tz="GMT" ) -# Only one covariable (so that the "matrix" is always invertible) +# Only one covariable (no need for more; random, to invert cov(M)) L = length(dates) #182 -exo_df = data.frame( "date"=dates, "var"=rep(1,L), "var_pred"=rep(1,L) ) +exo_df = data.frame( "date"=dates, "var"=rnorm(L,1), "var_pred"=rnorm(L,1) ) # Series are 1,1,...,1 2,2,...,2 ... 7,7,...,7 1,1,...,1 ...etc # First serie on monday 2007-01-01, there are exactly 26 weeks ts_df = data.frame( "time"=times, "value"=rep(seq_len(7), each=24, times=26) )