% mccullagh2_pdf.m - evaluates a McCullagh 2 Probability Density.
% See "Continuous Univariate Distributions", v.2, Johnson, Kotz, & Balakrishnan,
% J. Wiley, 1995, p.615 and "Some Statistical Properties of a Family of Continuous Univariate
% Distributions", P. McCullagh, U. Chicago, JASA, v.84, No.405, p.125, 1989.
% Vector Form of PDF !!!
% Created by Jim Huntley, 7/11/07
function [pdf] = mccullagh2_pdf(x, n, theta)
nu = 0.5*n;
pdf = (1-x.^2).^(nu-0.5) .* (1-theta^2) ./ ...