Hi everyone,
I have a panel data with missing values. When I try to estimate a fixed or random effects regression, the proc panel procedure returns with an error like this: "there are missing values in the TS variable". So I can't make an estimation. Can you help me how to solve this problem? I'm using SAS OnDemand for Academics by the way.
Can you remove the missing observations? Maybe something like:
PROC PANEL data=your.data(where=(TS~=.));
*...(your model code);
RUN;
Hi,
Thank you for your answer. I added the code you suggested to the end of the proc panel statement, but this time it returned with two errors: "Variable TS is not on file WORK.GAS" and "No data set open to look up variables". My data actually an open access stata file(.dta) so I used the following code to import it to SAS:
%web_drop_table(work.gas);
filename gas "/home/u37951485/gasoline4.dta";
run;
proc import datafile=gas
dbms=dta
out=work.gas;
run;
%web_open_table(work.gas);
My panel procedure is:
proc panel data=work.gas (here your suggested extension);
id country year;
model lgasconspc=lgasp co2int annual_temp /fixone;
run;
The interesting thing is that I can estimate the model with proc reg without any errors. İn Stata, I also can estimate the model even though it is an unbalanced panel without any problems. I have read on SAS support that proc panel procedure would simply ignore the misssing values and estimate the model. But it does not. What is the problem or what am I doing wrong?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.