nes(n,1), X];

g = 100;
what = X1\y; <span class="comment">% MLE</span>
mu = g/(g+1)*what; <span class="comment">% post mean, eqn 3.7</span>
yhat = X1*what;
s2 = (y-yhat)'*(y-yhat);
v = s2 + what'*X1'*X1*what/(g+1); <span class="comment">% eqn below 3.8</span>
Sigma = g/(g+1)*v/n*inv(X1'*X1);
vvar = diag(Sigma);


<span class="comment">% unnormalized log p(data|Model i)</span>
<span class="keyword">for</span> i=1:(d+1)
   X1i =  X1; X1i(:,i) = []; <span class="comment">% X1(:,models{i});</span>
   q = 1; <s