reverse-shooting

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

pantrendtst.m (533B)


      1 % PanTrendTST.m  []=pantrendtst(y,detx,terms)
      2 %    Estimates linear trends (terms=1) or quadratic (terms=2) trends
      3 %    Includes fixed effects if detx>=2
      4 
      5 
      6 function [bb,tt]=pantrendtst(y,detx,terms);
      7 
      8 if exist('terms')~=1;  terms=1; end;
      9 
     10 sy  = panlag(y,0,detx>=2);          % Get demeaned lags?
     11 trnd= pantrend(y,0,3,terms);		    %  3 ==> demean the trend.
     12 [bb, tt, sig] = lstiny(sy,trnd);
     13 if terms==1;
     14 	fprintf('%8.4f %8.4f %8.2f',[bb bb/tt tt]);
     15 elseif terms==2;
     16 	fprintf('%8.4f %8.2f %8.4f %8.2f',[bb(1) tt(1) bb(2) tt(2)]);
     17 end;