There were several parentheses that were missing.
If you try the following code you should not get any syntax errors:
proc optmodel;
set S;
number t{S};
var q >= 0 <= 1 init 0.5;
var muaa init 0;
var muab init 0;
var mubb init 0;
var sigma>=0.000001 init 0.05;
max log= sum{i in S}
LOG(1/(SQRT(2*3.14)*sigma)
)
+
sum{i in S}
LOG(
((1-q)**2)*
(EXP(
-((t-muaa)**2)/(2*((sigma)**2)))
+
(2*q*(1-q))*EXP(
-((t-muab)**2)/(2*((sigma)**2))
)
+
((q)**2)*EXP(
-((t-mubb)**2)/(2*((sigma)**2))
)
)
);
read data QTp into S=[_n_] t=QTp;
solve with nlpc / tech=cgr printfreq=1 maxiter=5000;
print q sigma muaa muab mubb;
quit;

... View more