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
destring when numerical values with < or > signsHello, I am working on epidemiological data and I have a couple of variable from biomarkers for whi…
The Deflator index, again.Hello all, I did two posts about this, but I am having trouble swimming through the data. The value…
How to delete the first two letters from a string variable?Hello Mr Mrs Help I have a variable called bvid. It is in a form of either abxxxxxxxx or xxxxxxxxxx…
Different way of clustering with reghdfeHello everyone! I'm currently running a multi-way fixed effect regression using the command reghdfe…
Generating missing dataHi! i have a panel of data with a single misuration for every months over 8 years. For some months …
Subscribe to:
Post Comments (Atom)
0 Response to Error in expression
Post a Comment