Help using Base SAS procedures

problem in panel data analysis: Not enough observations with non-missing model variables for model statement in cross section

Accepted Solution Solved
Reply
Contributor
Posts: 38
Accepted Solution

problem in panel data analysis: Not enough observations with non-missing model variables for model statement in cross section

Hi all,

When I did panel data analysis like below:

proc sort data=al_us_l_r_l_res_sdm_bpres_sa_f;

by ds_code yrmth;

run;

proc panel data=al_us_l_r_l_res_sdm_bpres_sa_f;

id ds_code yrmth;

model wr = wrds_1 wwcor_kz_1 wwcor_kz_1wrds_1 rolling_stdm wwroa_1_d wlnmv_1 lnbm_1 wmomentum /FIXONE;

run;

there is error message like below:

ERROR: Not enough observations with non-missing model variables for model statement  in cross section DS_Code=130286.

NOTE: The SAS System stopped processing this step because of errors.

As I checked the dataset, there was no non-missing values for DS_Code=130286 (see the attached file). Is this the reason that caused the error? Do I need to exclude the observations for DS_Code=130286 to proceed the panel data analysis? If yes, since there are some many identities (DS_Code) in my original dataset, is there any easy way to exclude the observations for these identities (e.g., if there is no non-missing valuse for any variable of an identity, then exclude these identities in the panel analysis)? Will excluding these identities resolve my problem?

Any advice will be appreciated.

Attachment

Accepted Solutions
Solution
‎12-23-2014 08:55 AM
Contributor
Posts: 38

Re: problem in panel data analysis: Not enough observations with non-missing model variables for model statement in cross section

Posted in reply to SteveDenham

Thanks SteveDenham.


rolling_stdm is not the only variable that has missing values for every observation. Some other variables also might only have missing values for a certain identity (cross section). So I just delete all the observations that has missing value even only for a variable. By doing this, my problem seems to be resolved.

View solution in original post


All Replies
Respected Advisor
Posts: 2,655

Re: problem in panel data analysis: Not enough observations with non-missing model variables for model statement in cross section

Posted in reply to comeon2012

The first 177 records have nothing but missing values for the right-hand side variables.  While that may not be the whole of the problem, it is a good place to start.  Also rolling_stdm is missing for every observation.  The latter is probably the main source of your problem.  Restate your model, excluding this variable and see what happens.

Steve Denham

Solution
‎12-23-2014 08:55 AM
Contributor
Posts: 38

Re: problem in panel data analysis: Not enough observations with non-missing model variables for model statement in cross section

Posted in reply to SteveDenham

Thanks SteveDenham.


rolling_stdm is not the only variable that has missing values for every observation. Some other variables also might only have missing values for a certain identity (cross section). So I just delete all the observations that has missing value even only for a variable. By doing this, my problem seems to be resolved.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 1077 views
  • 3 likes
  • 2 in conversation