reverse-shooting

Matlab scripts for reverse shooting
Log | Files | Refs | README

stdevfast.m (275B)


      1 %stdevfast.m ==> no standard errors
      2 % calculates cross sectional standard deviations
      3 % data = TxN matrix
      4 %
      5 
      6 function std=stdevfast(data);
      7 
      8 	[T N]=size(data);
      9 
     10 	if ~isempty(data);
     11 		x =demean(data');
     12 		vcv=1/(N-1)*x'*x;
     13 %		vcv=1/(N)*x'*x;
     14 		std=sqrt(diag(vcv));
     15 	end;
     16 
     17 
     18 
     19 
     20 
     21 
     22 
     23