Help using Base SAS procedures

How to work on Panel Data using SAS Studio

Reply
New User
Posts: 1

How to work on Panel Data using SAS Studio

Hi SAS,

 

I have a panel data:

 

Independence variable: X1, X2, X3, PROV, and TAHUN

Dependence variable: Y

 

So I write the SAS procedures, as follow:

 

data kebakaran1;
*length PROV $ 2;
input X1 X2 X3 Y PROV TAHUN LnY LnX1 LnX2 LnX3 X12 X22 X32;
label X1 = "Number fire hot spots";
label X2 = "Number of Precipitation, in mm";
label X3 = "GRDP Percapita at 2010 Constant Market Prices, in billion rupiahs";
label Y = "Total areas of forest and land fire, in Hektar";
label PROV = "Observation Province Jambi, Kalimantan Barat, ...,Sumatera Utara";
label TAHUN = "Year of Observation Data 2010, ...,2015";
label LnY = "Natural Logarthm of Y";
label LnX1 = "Natural Logarthm of X1";
label LnX2 = "Natural Logarthm of X2";
label LnX3 = "Natural Logarthm of X3";
label X12 = "X1 squared";
label X22 = "X2 squared";
label X32 = "X3 squared";

 

cards;

[data with number]

;
proc means data=kebakaran1;
var Y X1 X2 X12 X22 X3;
run;

 

proc sort data=kebakaran1;
by PROV TAHUN;
run;

 

*Pooled OLS estimator;
proc reg data=kebakaran1;
model Y= X1 X2 X12 X22 X3;
run;

 

*Pooled OLS estimator;
proc panel data=kebakaran1;
ID PROV TAHUN;
model Y= X1 X2 X12 X22 X3 / BTWNG;
run;

 

The respod from SAS processing are good, except on the PANEL, the respond from the SAS as follow:

 
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
61
62 data kebakaran1;
63 length PROV $ 2;
64 input X1 X2 X3 Y PROV TAHUN LnY LnX1 LnX2 LnX3 X12 X22 X32;
65 label X1 = "Number fire hot spots";
66 label X2 = "Number of Precipitation, in mm";
67 label X3 = "GRDP Percapita at 2010 Constant Market Prices, in billion rupiahs";
68 label Y = "Total areas of forest and land fire, in Hektar";
69 label PROV = "Observation Province Jambi, Kalimantan Barat, ...,Sumatera Utara";
70 label TAHUN = "Year of Observation Data 2010, ...,2015";
71 label LnY = "Natural Logarthm of Y";
72 label LnX1 = "Natural Logarthm of X1";
73 label LnX2 = "Natural Logarthm of X2";
74 label LnX3 = "Natural Logarthm of X3";
75 label X12 = "X1 squared";
76 label X22 = "X2 squared";
77 label X32 = "X3 squared";
78 cards;
 
NOTE: The data set WORK.KEBAKARAN1 has 54 observations and 13 variables.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.08 seconds
 
133 ;
 
134 proc means data=kebakaran1;
135 var Y X1 X2 X12 X22 X3;
136 run;
 
NOTE: There were 54 observations read from the data set WORK.KEBAKARAN1.
NOTE: PROCEDURE MEANS used (Total process time):
real time 1.03 seconds
cpu time 1.04 seconds
 
 
137 proc sort data=kebakaran1;
138 by PROV TAHUN;
139 run;
 
NOTE: There were 54 observations read from the data set WORK.KEBAKARAN1.
NOTE: The data set WORK.KEBAKARAN1 has 54 observations and 13 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.05 seconds
cpu time 0.05 seconds
 
 
140 *Pooled OLS estimator;
141
141 ! proc reg data=kebakaran1;
142 model Y= X1 X2 X12 X22 X3;
143 run;
 
144 *Pooled OLS estimator;
 
NOTE: PROCEDURE REG used (Total process time):
real time 7.76 seconds
cpu time 2.97 seconds
 
145 proc panel data=kebakaran1;
 
ERROR: Procedure PANEL not found.
146 ID PROV TAHUN;
147 model Y= X1 X2 X12 X22 X3 / BTWNG;
148 run;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PANEL used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
 
149
150
151
152 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
165
___________________
 
Please help how I could sove this panel processing problem.
Thanks very much,
 
Erwin
Ask a Question
Discussion stats
  • 0 replies
  • 234 views
  • 0 likes
  • 1 in conversation