Fluorite | Level 6

## GLM confidence limits for group specific intercepts and slopes

I am using proc GLM with dummy variables coding for different groups and a continuous variable. Then, I can get coeffcients and CI for all variables and interactions.

I then compute group-specific intercept and slopes for the 0-group as follows:

intercept + ca t0

cont + cont*cat 0

How then can I get the corresponding CI?

Example:

```data tmp;
input cont cat outcome;
datalines;
1.1 0 0.8
1.5 0 0.6
2.1 0 0.6
5.1 0 0.2
2.1 1 0.9
1.1 1 0.7
1.4 1 0.8
4.7 1 0.3
;
run;

proc glm data=tmp;
class cat;
model outcome = cont | cat / solution clparm;
run;```
 Parameter Estimate Standard Error t Value Pr > |t| 95% Confidence Limits Intercept 0.989189 0.128196 7.72 0.0015 0.633259 1.34512 cont -0.13514 0.04707 -2.87 0.0454 -0.26582 -0.00445 cat 0 -0.10905 0.178144 -0.61 0.5735 -0.60366 0.385561 cat 1 0 . . . . . cont*cat 0 0.000383 0.06342 0.01 0.9955 -0.1757 0.176466 cont*cat 1 0 . . . . .

1 ACCEPTED SOLUTION

Accepted Solutions
Diamond | Level 26

## Re: GLM confidence limits for group specific intercepts and slopes

Okay, then you need to re-parameterize the model so that each of these terms of interest is an individual term in the model.

``model outcome = cat cont*cat / solution clparm;``

The group specific slopes are the cont*cat terms. The group specific intercepts are the cat term.

--
Paige Miller
5 REPLIES 5
Diamond | Level 26

## Re: GLM confidence limits for group specific intercepts and slopes

These are essentially the confidence intervals for predicted values.

So you need to add the desired levels of conc and cat to your dataset, with missing values for outcome, and then the OUTPUT statement data set will contain the desired confidence intervals.

--
Paige Miller
Fluorite | Level 6

## Re: GLM confidence limits for group specific intercepts and slopes

I am afraid predicted values CI are not what I am looking for.

To be more precise, let's assume my model is as follows:

outcome = b0 + b1 * group + (b2 + b3*group) * x

with "group" being a binary variabe.

I am looking for the CIs of the group-specific intercept  (b0 + b1*group) and the group-specific slopes (b2 + b3*group) with no regard to the value of x.

Diamond | Level 26

## Re: GLM confidence limits for group specific intercepts and slopes

Okay, then you need to re-parameterize the model so that each of these terms of interest is an individual term in the model.

``model outcome = cat cont*cat / solution clparm;``

The group specific slopes are the cont*cat terms. The group specific intercepts are the cat term.

--
Paige Miller
Fluorite | Level 6

## Re: GLM confidence limits for group specific intercepts and slopes

I accepted the answer a bit fast (because I am mainly interested in the slopes).

Your solution works for slopes, but the intercept still have to be added to "cat".

Is there a workaround for that?

Output:

 Intercept 0.989189 0.12819646 7.72 0.0015 0.6332587543 1.3451196241 cat 0 -0.109047 0.17814433 -0.61 0.5735 -.6036552868 0.3855605963 cat 1 0 . . . . . cont*cat 0 -0.134752 0.04250296 -3.17 0.0338 -.2527589074 -.0167446387 cont*cat 1 -0.135135 0.04707033 -2.87 0.0454 -.2658233265 -.0044469437
Diamond | Level 26

## Re: GLM confidence limits for group specific intercepts and slopes

Add the NOINT option into the MODEL statement.

--
Paige Miller
Discussion stats
• 5 replies
• 673 views
• 2 likes
• 2 in conversation