Parameters within parameters
Posted: Tue Sep 20, 2011 10:24 am
Hello,
I have been trying to work something out for a little while and can still not find an answer. It is quite trivial, and that is why I have not asked on the forum before, but at the same time presumably the answer is quite trivial and (hopefully) easily explained; therefore I figured I would finally just ask.
The problem I am having is that when I set up a model which includes parameters that are a function of other calibrated parameters I can only effectively go for one step. For example, I can have:
But I cannot have:
becauce delta is a function of gamma which is itself a function of alpha and beta.
Now, although this annoyed me at first, doing the former rather than the latter is simple enough (although it makes things harder when checking my coding). However, when I start to loop certain parameters the operation does not work if for example I loop alpha, but would work if I loop another parameter that does not then subsequently go into other parameters, epsilon for example.
I figured that the two problems were probably coming from the same route and thought that it would be best to check whether there was a simple enough answer.
Many thanks,
Richard.
I have been trying to work something out for a little while and can still not find an answer. It is quite trivial, and that is why I have not asked on the forum before, but at the same time presumably the answer is quite trivial and (hopefully) easily explained; therefore I figured I would finally just ask.
The problem I am having is that when I set up a model which includes parameters that are a function of other calibrated parameters I can only effectively go for one step. For example, I can have:
- Code: Select all
parameters alpha beta gamma;
alpha = 1;
beta = 2;
gamma = a/(alpha*beta);
epsilon = 3;
But I cannot have:
- Code: Select all
paramets alpha beta gamma delta;
alpha = 1;
beta = 2;
delta = 1lpha*beta;
gamma = 1/delta;
epsilon = 3;
becauce delta is a function of gamma which is itself a function of alpha and beta.
Now, although this annoyed me at first, doing the former rather than the latter is simple enough (although it makes things harder when checking my coding). However, when I start to loop certain parameters the operation does not work if for example I loop alpha, but would work if I loop another parameter that does not then subsequently go into other parameters, epsilon for example.
I figured that the two problems were probably coming from the same route and thought that it would be best to check whether there was a simple enough answer.
Many thanks,
Richard.