Programming the statistical procedures from SAS

Prediction of New Data using PROC GLM for Fixed-Effects

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Prediction of New Data using PROC GLM for Fixed-Effects

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?


Accepted Solutions
Solution
‎05-23-2017 09:31 PM
Trusted Advisor
Posts: 1,444

Re: Prediction of New Data using PROC GLM for Fixed-Effects


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.

View solution in original post


All Replies
Trusted Advisor
Posts: 1,444

Re: Prediction of New Data using PROC GLM for Fixed-Effects

The correct approach is to not use the ABSORB statement, and then the PROC will give you predicted values for the new data.

New Contributor
Posts: 4

Re: Prediction of New Data using PROC GLM for Fixed-Effects

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".

Attachment
Trusted Advisor
Posts: 1,444

Re: Prediction of New Data using PROC GLM for Fixed-Effects

[ Edited ]

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;

 

 

New Contributor
Posts: 4

Re: Prediction of New Data using PROC GLM for Fixed-Effects

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?

Solution
‎05-23-2017 09:31 PM
Trusted Advisor
Posts: 1,444

Re: Prediction of New Data using PROC GLM for Fixed-Effects


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.

☑ This topic is SOLVED.

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

Discussion stats
  • 5 replies
  • 134 views
  • 0 likes
  • 2 in conversation