Hello,
I am created a local variable `tif' which loops over around 45 terms (string).
local tif "0"
foreach var of varlist item101-item145 {
local iic "(1.7*`var'a)^2*(1/(1+exp(-1.7*`var'a*(x-`var'b))))*(1-(1/(1+exp(-1.7*`var'a*(x-`var'b)))))"
local tif "`tif'+ `iic "
}
This `tif' is a mathematical expression in terms of x. I then code:
twoway (function `tif', range(-5 5))
All these run fine. However the moment I add another term in the loop say item146, I get an error : "error in expression"
error in expression: 0+ (1.7*item101a)^2*(1/(1+exp(-1.7*item101a*(x-item101b))))*(1-(1/(1
> +exp(-1.7*item101a*(x-item101b)))))..........
Is this because the function has increased its maximum length? I am not sure what the problem is.
Related Posts with Error in expression
Writing a formula in which stata chooses a value or 1Hi! I'm trying to use this formula to calculate eGFR: eGFR = 142*min(standardized Scr/K, 1)^α *max(…
Side-by-side boxplots with markers for meansHello, I have country-level panel data for GDP per capita for the past 10 years that I wish to repr…
Creating a scatterplot with two different variablesHow to create a scatterplot with two different variables one being dependent and one being independe…
Adding rows under a variableStata command for adding rows lets say 10 rows under a variable which has fixed observations like 40…
Callagain command by Behaghel et al.Hi I'm currently trying to run the command "callagain" by Behaghel et al. (to be found here). Unfor…
Subscribe to:
Post Comments (Atom)
0 Response to Error in expression
Post a Comment