Hello everyone.
Please let me ask a question again…
At previous topic I posted, I was taught that I must use when I declare vectors like vector[2] x = [1.0, 2.0]'
And, the following code was successfully compiled:
(Omission)
transformed data{
vector[1] y_guess = [1.0]';
real x_r[0];
int x_i[0];
}
parameters{
real mu;
real beta;
}
transformed parameters{
vector[2] theta = [mu, beta]';
real alpha = algebra_solver(algebra_system, y_guess, theta, x_r, x_i)[1];
}
(Omission)
However, as theta
and y_guess
are temporary variables, I tried to rewrite this:
(Omission)
transformed data{
real x_r[0];
int x_i[0];
}
parameters{
real mu;
real beta;
}
transformed parameters{
real alpha = algebra_solver(algebra_system, [1.0]', [mu, beta]`, x_r, x_i)[1];
}
(Omission)
And then unfortunately, I got this error message:
Compilation ERROR, function(s)/method(s) not created!
I searched this problem.
According to it, this error seems to be occurred by around Rtools
, c++
, or gcc
.
However, Unlike them who are suffered from same error, when I use temporary variables, compilation has succeeded.
I would not like to use temporary variables for readability.
I appreciate anyone’s help.
Thank you.