pan class="comment">% num coeffs which are set to 0</span>
   logprob(i) = -(d+1-q)/2 * log10(g+1) + <span class="keyword">...</span>
      -(n/2)*log10(y'*y - (g/(g+1))*y'*X1i*inv(X1i'*X1i)*X1i'*y);
<span class="keyword">end</span>
logprobFull = -(d+1)/2 * log10(g+1) + <span class="keyword">...</span>
      -(n/2)*log10(y'*y - (g/(g+1))*y'*X1*inv(X1'*X1)*X1'*y);
logBF = logprobFull  - logprob;
BF = 10.^logBF;

<span class="keyword">for</span> i=1:(d+1)
   <span class="comment">% jeffreys scale of evidence,