%Macro Comb(_totelemComb, _sampElemComb, _Comb); /**************************************************************************************/ /* _totelemComb = is a whole number that is the number of elements from which the */ /* sample is chosen. (REQUIRED) */ /* _samElemComb = the whole number that is the number of chosen elements. (REQUIRED) */ /* _Comb = the returned Combination value. */ /* */ /* Name: Comb.SAS */ /* Data: Sourced from MineQuest, LLC. Auth: Phil Rack */ /* Date: 5/15/2007 Revd: */ /* */ /* Copyright (C) 2007 by MineQuest, LLC. All Rights Reserved. */ /**************************************************************************************/ if (&_totelemcomb le 0) or (&_totelemcomb = .) or (&_sampelemcomb le 0) or (&_sampelemcomb = .) or (&_totelemcomb lt &_sampElemcomb) then Do; &_comb = .; End; Else Do; %fact(&_totelemcomb,_nfact ); %fact(&_sampElemcomb,_rfact); _diff = &_totElemcomb - &_sampElemcomb; %fact(_diff,_rfact2); &_comb = _nfact / (_rfact * _rfact2); drop _nfact _rfact _rfact2 _diff; End; /********************************************************************************************/ /* COMB is copyright (c) 2007 by MineQuest, LLC. All Rights Reserved. */ /* MineQuest, LLC, 1939 Queensbridge Dr., Columbus, OH USA. */ /* This Macro Program is proprietary software and is licensed property of MineQuest, LLC. */ /********************************************************************************************/ %mend Comb;