panel_d.m

来自「计量工具箱」· M 代码 · 共 39 行

M
39
字号
% PURPOSE: Demonstrates use of panel data estimation
% The followig program use the data from " Introduction to the Theory and Practice of 
% Econometrics "(Judge, Hill, Griffiths, L黷kepohl and Lee) Second Edition.
% Chapter 11 pages 476-479 and pages 487-488, as an example to test the procedures for 
% panel data estimation.

clear;
%carga los datos
load datat.txt;      %Judge Example with Balanced Panel

%assign data

y= datat(:,2:3);
id = datat(:,1);

vnames =  ['c',		% Cost 
   		  'y'];		% Output     


% Pooled Estimation
results = ppooled(y);
prt_panel(results,vnames);


% Fixed Effects Estimation
result1 = pfixed(y,id);
prt_panel(result1,vnames);


% Random Effects Estimation
result2 = prandom(y,id);
prt_panel(result2,vnames);

% Haussman Test 
phaussman(result1, result2);



⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?