Solved
New Contributor
Posts: 2

# lincom function in proc mixed

I am trying to get an estimated from the model I ran using Proc Mix for a continuous variables (ie. year). Is there a easy way to output Y for year=x fixing the other covariates at certain level? such as the lincom command in Stata?

I.e.

y=intercept+b1(year)+b2(sex)+b3(race)+b4(exposure)+b5(year^2)+b6(exposure*year)+b7(exposure*year^2)

Thanks.

Accepted Solutions
Solution
‎06-13-2018 02:12 PM
SAS Super FREQ
Posts: 4,245

## Re: lincom function in proc mixed

This is called a "slice" through the response surface. There are two approaches:

1. If you want a graph of the predicted response versus the Year, holding other variables fixed, you can use the EFFECTPLOT statement in several SAS regression procedures. However, mixed modeling procedures do not support the EFFECTPLOT statement directly, you have to STORE the model and then use PROC PLM to create the sliced fit plot.

2. If you want a table that shows the predicted responses at particular values of Year (holding other variables constant), you can STORE the model and then use PROC PLM and the SCORE statement to score the model on whatever values you want.

The nice thing about the graphical method is there is built-in support for fixing the covariates at the mean or median. For the scoring method, you would have to precompute those values yourself if you want to use them as the covariate values.

All Replies
Solution
‎06-13-2018 02:12 PM
SAS Super FREQ
Posts: 4,245

## Re: lincom function in proc mixed

This is called a "slice" through the response surface. There are two approaches:

1. If you want a graph of the predicted response versus the Year, holding other variables fixed, you can use the EFFECTPLOT statement in several SAS regression procedures. However, mixed modeling procedures do not support the EFFECTPLOT statement directly, you have to STORE the model and then use PROC PLM to create the sliced fit plot.

2. If you want a table that shows the predicted responses at particular values of Year (holding other variables constant), you can STORE the model and then use PROC PLM and the SCORE statement to score the model on whatever values you want.

The nice thing about the graphical method is there is built-in support for fixing the covariates at the mean or median. For the scoring method, you would have to precompute those values yourself if you want to use them as the covariate values.

☑ This topic is solved.

Discussion stats