Hello
This seems like a very basic question but I’ve been trying different solutions and nothing has worked so far.
I have a vector of some parameters:
parameters{
vector<lower=0>[n] pars;
}
In the transformed_parameters
block, I am trying to make a vector of reciprocal values of those parameters for use in further computations. Here are a couple of things I tried:
transformed_parameters{
vector<lower=0>[n] rec_pars;
rec_pars = 1/pars;
}
This results in an error: No matches for: Available argument signatures for operator /: Expression is ill formed. Adding a dot .
before the /
creates the same error.
I’ve also tried:
transformed_parameters{
vector<lower=0>[n] rec_pars;
rec_pars = operator/(1, pars);
}
However, this tells me Variable ‘operator’ does not exist.. Adding a dot before the slash still does the same thing.
Lastly, I’ve tried
transformed_parameters{
vector<lower=0>[n] rec_pars = 1/pars;
}
And this tells me again that there are no available argument signatures. So I don’t really understand how can I perform an operation as simple as this.