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
Cleaning for missing observations (cross-sectional data) for a range of variablesDear all, I have a particular problem. I have a data of probability of default for 2000 entities an…
Assigning numbers from 1 to (total number of observations) randomly to the data setHello, What is the best way to assign a random number from 1 to 413,294 (which is the total number o…
combining foreach and by with stringsHello, I found similar topics on the forum but the solutions provided do not seem to fit my case. …
Can -stcox-* do multilevel analyses with one failure?Hi everybody, Can -stcox- do multilevel analyses with one failure?; i.e., can -stcox- take the repe…
Model's forecast accuracy evaluationHi everyone, I want to evaluate forecasting accuracy of ARIMA (1,1,1) model. I use only one variabl…
Subscribe to:
Post Comments (Atom)
0 Response to Error in expression
Post a Comment