Programming the statistical procedures from SAS

proc nlp with binary parms

Reply
Regular Contributor
Posts: 178

proc nlp with binary parms

hi, i don't know much about nlp so sorry for a dumb question.

is it possible to limit possible values for the parameters to just 0 and 1?

see my code below, it should only evaluate:

p11=1, p12=0 or vice versa

p21=1, p22=0 or vice versa

etc.

-Bart

MPRINT(X):   proc nlp data=WORK.TRNSTRANSPOSEDQUERY6572 outest=outest out=out1;

MPRINT(X):   array numrows[4] numrows1-numrows4;

MPRINT(X):   parms p11 p12 p21 p22 p31 p32 p41 p42;

MPRINT(X):   lincon p11 + p12 = 1;

MPRINT(X):   lincon p21 + p22 = 1;

MPRINT(X):   lincon p31 + p32 = 1;

MPRINT(X):   lincon p41 + p42 = 1;

MPRINT(X):   loadcpu1 = p11*numrows1 + p21*numrows2 + p31*numrows3 + p41*numrows4 ;

MPRINT(X):   loadcpu2 = p12*numrows1 + p22*numrows2 + p32*numrows3 + p42*numrows4 ;

MPRINT(X):   variance = var(loadcpu1 ,loadcpu2 );

MPRINT(X):   min variance;

MPRINT(X):   run;

Ask a Question
Discussion stats
  • 0 replies
  • 137 views
  • 0 likes
  • 1 in conversation