-
Notifications
You must be signed in to change notification settings - Fork 0
/
FrontierRice.ox
58 lines (41 loc) · 1.5 KB
/
FrontierRice.ox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <oxstd.h>
#include <packages/gnudraw/gnudraw.h>
//#import <packages/sfamb/sfamb>
#include <sfambGTREml.ox>
main(){
/*new object of class 'Sfa', Load data*/
decl fob = new Sfa(); fob.Load("DataFrontierRiceProdPhilSort.xlsx");
// fob.Info(); exit(1);
/**********************************************************************************
The output is annual rice production (measured in tons).
We include the
-area planted (measured in hectares),
-labor employed (measured in days per worker), and
-the amount of fertilizer (measured in kilograms) used as inputs.
RE (Pitt & Lee): LLF -86.4304278
**********************************************************************************/
fob.SetConstant();
/*Identification of panel structure*/
fob.Ident(fob.GetVar("FMERCODE"), fob.GetVar("YEARDUM"));
/*Data is already in logs, renew the names*/
fob.Renew(fob.PrepData(fob.GetVar("PROD"), 0), "lny");
fob.Renew(fob.PrepData(fob.GetVar("LABOR"), 0), "lnlab");
fob.Renew(fob.PrepData(fob.GetVar("AREA"), 0), "lnarea");
fob.Renew(fob.PrepData(fob.GetVar("NPK"), 0), "lnfert");
// fob.Info(); exit(2);
/*Set up model*/
fob.Select(Y_VAR, {"lny",0,0}); // Select dependent variable
fob.Select(X_VAR, { // Select regressors
"Constant",0,0,
"lnlab",0,0,
"lnarea",0,0,
"lnfert",0,0
});
// Select estimation sample
fob.SetSelSample(-1, 1, -1, 1); // full sample
fob.SetPrintSfa(TRUE);
MaxControl(1000,10,TRUE);
fob.SetPrintDetails(1);
fob.Estimate();
delete fob;
}