BookmarkSubscribeRSS Feed
michaericalribo
Calcite | Level 5

At the bottom is a toy data set that I am trying to analyze with PROC PANEL. I want to produce predicted values for the year 2011, however, I receive the following error:

 

ERROR: Each observation for time point Year=2011 has a missing value for at least one variable in
       MODEL statement .

How can I produce the predicted values for the year 2011? The SAS docs read, "Any observation in the input data set with a missing value for one or more of the regressors is ignored by PROC PANEL and is not used in the model fit...If there are observations in the input data set with missing dependent variable values but with nonmissing regressors, PROC PANEL can compute predicted values and store them in an output data set by using the OUTPUT statement."

 

If I add even one dummy response observation to 2011---eg, change the value for age 0---SAS is able to run the procedure fine.

 

Thanks for any insight!

 

DATA asthma;
   INPUT Age $ Year $ pop cases; 
   DATALINES;
0 2009 78269 2
18 2009 30767 18
25 2009 82201 42
45 2009 81776 94
65 2009 34936 60
85 2009 5543 27 
0 2010 78269 0
18 2010 30767 16
25 2010 82201 65
45 2010 81776 119
65 2010 34936 80
85 2010 5543 23
0 2011 78049 .
18 2011 31094 .
25 2011 82492 .
45 2011 82851 .
65 2011 35665 .
85 2011 5702 .
; 
PROC PRINT; RUN;

PROC SORT data=asthma;
BY Age Year;
RUN;

PROC PANEL data=asthma;
ID Age Year;
MODEL cases = pop / fixone plots=all;
OUTPUT output=asthma_pred RUN;
1 REPLY 1
SteveDenham
Jade | Level 19

Have you asked this question in the Econometrics and Forecasting forum?  This seems more up their alley.

 

Steve Denham

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 1427 views
  • 0 likes
  • 2 in conversation