📄 p60 grunest1.ox
字号:
#include <oxstd.h>
#import <packages/dpd/dpd>
main()
{
decl dpd = new DPD(); // declare and create DPD object
dpd.Load("grunfeld.xls"); // load data
//print( dpd.GetAll() ); // would print whole database
dpd.Info(); // print database summary statistics
dpd.SetYear("Year"); // specify columns with years
dpd.Select(Y_VAR, {"I", 0, 0}); // formulate model
dpd.Select(X_VAR, {"F_1", 0, 0, "C_1", 0, 0});
//------------------- OLS -----------------------------
dpd.SetOptions(FALSE); // no robust std.errors
dpd.SetTransform(T_NONE); // estimate in levels
print("\n\n***** Baltagi (1995), Table 2.1: OLS");
dpd.Estimate(); // 1-step estimation
//------------------- between -------------------------
dpd.SetTransform(T_BETWEEN); // estimate between groups
print("\n\n***** Baltagi (1995), Table 2.1: Between");
dpd.Estimate(); // 1-step estimation
//------------------- within --------------------------
dpd.SetTransform(T_WITHIN); // estimate within groups
print("\n\n***** Baltagi (1995), Table 2.1: Within");
dpd.Estimate(); // 1-step estimation
delete dpd; // finished with object
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -