I know it seems like overkill, but I wanted to know if it is possible to make simple functions in cmdStan with no sampling. Say for example say I wanted to make a function that squared the a value.
The code below compiles, but when I try to run it I just get the standard help information asking for the data file. And the sampler I want to use. How can I just run a simple function like this?
functions{
real foo(data real x) {
return x^2;
}
}
transformed data {
real x=2;
real a;
a = foo(x);
print(a);
}