You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
user guide's page 241- Unmapped Implementation error #1
Line 8 of the unmapped implementation in the user guide's page 241 has this line: vector[2] beta[K];
And this produces the following error:
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
No matches for:
real[] .* vector
Available argument signatures for operator.*:
vector .* vector
row vector .* row vector
matrix .* matrix
No matches for:
real[] + ill formed
Available argument signatures for operator+:
int + int
real + real
vector + vector
row vector + row vector
matrix + matrix
vector + real
row vector + real
matrix + real
real + vector
real + row vector
real + matrix
+int
+real
+vector
+row vector
+matrix
Expression is ill formed
error in 'model1a7a481d4cfe_no_map_rect' at line 18, column 53
-------------------------------------------------
16: for (i in 1:2)
17: beta[ , i] ~ normal(mu[i], sigma[i]);
18: y ~ bernoulli_logit(beta[kk, 1] + beta[kk, 2] .* x);
^
19: }
-------------------------------------------------
I'm pretty sure that this line should be matrix[K, 2] beta;
which fixes the error.
Activity
mitzimorris commentedon Dec 18, 2018
shouldn't this be:
y ~ bernoulli_logit(to_vector(beta[kk, 1]) + to_vector(beta[kk, 2]) .* x)?bob-carpenter commentedon Dec 18, 2018
@mitzimorris That, or change the underlying types so to_vector isn't needed.
Also, there's another bug in the error message---it backtracked from the correct parse to an ill-formed one.
fix issues #1, #11
mitzimorris commentedon Dec 19, 2018
fixed by commit d514b28
mitzimorris commentedon Dec 20, 2018
left underlying types alone so that parameters line up with those of mapped version.
Merge pull request #1 from jsocolar/jsocolar-patch-1