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.