Hi,
I'm interested in understanding how to derive predictions for new data based on a fixed-effects model developed via PROC GLM with an ABSORB statement.
This post states:
And provided you don't need predicted values or regression diagnostics, you get all this with a marked reduction in overhead computational resources.
when using such an apporach. Hence, what is the correct course of action if you do need predicted values and regression diagnostics?
@AW92 wrote:
Hi Paige,
Thanks again.
From your answer, specifically the use of "id" as a covariate, am I correct in concluding that the use of fixed-effects regression is inappropriate for situations where you require future predictions for subjects whose "id" does not exist in the training data?
Yes, but so is using the ABSORB statement.
There's no logical way around this, if the data does not contain "id" values of future observations, the model can't predict when you get one of the future "id" values. This has nothing to do with SAS, it is a logical impossibility. What most people would do in this case is when the future "id" values arrives, they perform some statistical testing to estimate the mean value of the response variable for this future "id" value.
The correct approach is to not use the ABSORB statement, and then the PROC will give you predicted values for the new data.
Hi Paige,
Thanks for your time.
If I exclude the ABSORB statement, I don't think I am performing a fixed-effects regression any longer?
For instance, taking the example dataset:
data persyr3;
set my.nlsy;
id = _N_;
time = 1;
anti = anti90;
self = self90;
pov = pov90;
output;
time = 2;
anti = anti92;
self = self92;
pov = pov92;
output;
time = 3;
anti = anti94;
self = self94;
pov = pov94;
output;
run;
from:
Paul Allison's Fixed Effects Regression Methods for Longitudinal Data Using SAS
pages 20-21, section: 2.4 Estimation with PROC GLM for More Than Two Observations Per Person
running the PROC GLM:
proc glm data = persyr3;
absorb id;
class time;
model anti = self pov time / solution;
run;
with and without the ABSORB statement yields different parameter estimates. Hence, if I wish to use the fixed-effects estimates for prediction of new data and regression diagnostic checks, how is this performed?
I've attached the base dataset: "nlsy".
As far as I know, you can make PROC GLM be equivalent to the case where you used ABSORB.
UNTESTED CODE
proc glm data = persyr3; class id time; model anti = id self pov time / solution; run;
Hi Paige,
Thanks again.
From your answer, specifically the use of "id" as a covariate, am I correct in concluding that the use of fixed-effects regression is inappropriate for situations where you require future predictions for subjects whose "id" does not exist in the training data?
@AW92 wrote:
Hi Paige,
Thanks again.
From your answer, specifically the use of "id" as a covariate, am I correct in concluding that the use of fixed-effects regression is inappropriate for situations where you require future predictions for subjects whose "id" does not exist in the training data?
Yes, but so is using the ABSORB statement.
There's no logical way around this, if the data does not contain "id" values of future observations, the model can't predict when you get one of the future "id" values. This has nothing to do with SAS, it is a logical impossibility. What most people would do in this case is when the future "id" values arrives, they perform some statistical testing to estimate the mean value of the response variable for this future "id" value.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.