function logL = gamlik1(params, p, q, r) 
%GAMLIK1 is a helper function. It is the same as GAMLIKE, except it
% directly computes the gampdf without calling GAMPDF, also, saved some
% error checking and size checking.

%   ZP. You 3-8-99
%   Copyright 1993-2000 The MathWorks, Inc. 
%   $Revision: 1.3 $  $Date: 2000/05/26 18:52:53 $

a = params(1); 
b = params(2);
logL = (1-a)*p + q/b + r*gammaln(a) + a*r*log(b);
