epsilon[t]
Not a legal assignment, sampling, or function statement. Note that
* Assignment statements only allow variables (with optional indexes) on the left;
if you see an outer function logical_lt (<) with negated (-) second argument,
it indicates an assignment statement A <- B with illegal left
side A parsed as expression (A < (-B)).
* Sampling statements allow arbitrary value-denoting expressions on the left.
* Functions used as statements must be declared to have void returns
ERROR at line 14
12: vector[T] epsilon; // error term at time t
13: for (t in 1:T) {
14: epsilon[t] = y[t] - mu;
^
15: for (q in 1:min(t - 1, Q))
PARSER EXPECTED: "}"
Error in stanc(file = file, model_code = model_code, model_name = model_name, :
failed to parse Stan model 'stanalt' due to the above error.
In addition: Warning messages:
1: package ‘rstan’ was built under R version 3.2.5
2: package ‘ggplot2’ was built under R version 3.2.5
> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reshape2_1.4.1 dplyr_0.4.3 rstan_2.9.0-3 ggplot2_2.1.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.5 assertthat_0.1 grid_3.2.3 plyr_1.8.4 R6_2.1.2 gtable_0.2.0
[7] DBI_0.4-1 magrittr_1.5 stats4_3.2.3 scales_0.4.0 stringi_1.1.1 tools_3.2.3
[13] stringr_1.0.0 munsell_0.4.3 parallel_3.2.3 inline_0.3.14 colorspace_1.2-6 gridExtra_2.2.1
>