function J = sumsq_pow(p,xdata,ydata)
% Function to compute the least squares error for allometric model
model = p(1)*xdata.^p(2);  % Power law model using parameter p
error = model - ydata;      % Error between model and data
J = error*error';           % Computes sum of square error
end

