Unformatted text preview: diag can generate a vector by taking the diagonal elements of a matrix. se = sqrt(diag(V)); diag can also generate a diagonal matrix DiagonalMatrix = diag(se); Hint: this command turns out to be useful for the construction of the robust covariance matrix term Σ [e 2 (i)x(i)x(i)']. (III) Parametric bootstrap: outboot=zeros(nboot,k); for iboot=1:nboot, u=floor(n*rand(n,1)+1); y_b=x*beta+eps(u,1); [beta_b]=ols(y_b,x); outboot(iboot,:)=beta_b'; end,...
View
Full Document
 Spring '06
 IMBENS
 Variance, Covariance matrix, Hendrik Wolff, command diag Let

Click to edit the document details