function [ LL ] = loglik(y,x,beta) %UNTITLED4 Summary of this function goes here % Detailed explanation goes here top=y-x*beta(1:end-1); sigma=beta(end); colchete=log(sigma.^2)+log(2*pi)+(top/sigma).^2; LL=(1/2)*sum(colchete); end