I am trying to pass a function through -runby-, this action is part of a larger loop in which the function in question changes at every iteration. If I am reading the documentation correctly, this is currently not possible with -runby-.
Current workout (faulty):
Let `programA(inputA)` be the program of interest. Although we can't pass `inputA` through `programA` through -runby-, we still want to leverage runby's speed so we decide to write a program called `programA_Wrapper` that creates a function called `programA_inputA`, which is then passed through -runby- as follows:
`programA_Wrapper` takes `inputA` as an argument through the standard `syntax` command.
Issue with the proposed workaround:
I am getting an error that `programA_inputA` is not being recognized which makes me think that STATA programs can't write other programs, is that correct? Is there an alternative?
PS. I am unfamiliar with the formatting language in this forum. In standard markdown we wrap inline code with (` `), what is the equivalent here?
Current workout (faulty):
Let `programA(inputA)` be the program of interest. Although we can't pass `inputA` through `programA` through -runby-, we still want to leverage runby's speed so we decide to write a program called `programA_Wrapper` that creates a function called `programA_inputA`, which is then passed through -runby- as follows:
Code:
runby programA_inputA, by(state) verbose
Issue with the proposed workaround:
I am getting an error that `programA_inputA` is not being recognized which makes me think that STATA programs can't write other programs, is that correct? Is there an alternative?
PS. I am unfamiliar with the formatting language in this forum. In standard markdown we wrap inline code with (` `), what is the equivalent here?
Comment