I greatly appreciate the syntax PROC OPTMODEL uses in declaring array and matrics - especially for facilitating cell identification based on flexible and varied index sets. Excellent for subsetting, and visually recognising what combination of dimensions a given cell represents. And the user does not have to worry about reording one matrix to match another, as long as they are based on the same SET dimensions. BUT below (in the VAR statement at the bottom - note the syntax in red) is how, to the best of my knowledge, one has to generate an X'X sum of squares and cross products from a matrix X. That's not so bad, but what if I wanted to generate, say, beta=(X'X) -1 (X'Y) or something a bit more extensive, yet trivially expressible in matrix form? There would a lot of "sum .. in". expressions and explicit subscripting requred - easy opportunities for typing erros.. How much nicer and more readable it would be to adapt some syntax from proc IML. Something like the violet in: var beta{cols} init inv(X`*X) * X`*Y; and have it work as long as X' and Y are compatible in their declared dimensions. If somebody is aware of such syntax in PROC OPTMODEL, please point me to it. Otherwise, this is a request for adding some IML-like syntax to proc optmodel statements. ** Sample prog **; data have; do r=1 to 6; 100*uniform(015981098)); 100*uniform(015986783)); 100*uniform(015984565)); output; end; proc optmodel; set rows init {1..6}; set cols init {1..3}; num X{rows,cols} ; read data have into rows= {c in cols} <x[r,c] =col( 'c'||c)>; var XpX{c1 in cols,c2 in cols} init sum{r in 1..6} X[r,c1]*X[r,c2];
... View more