BookmarkSubscribeRSS Feed
confooseddesi89
Quartz | Level 8

Hello,

 

I am interested in examining whether city Size (mediator; continuous) mediates the association between Race (predictor; 5 categories) and PA_days (outcome; count variable). Covariates are Sex and Depression (both dichotomous). Below are my data:

 

Data Race_PA;
Input ID Race Size PA_days Sex Depression;
datalines;
8	4	169.425	5	1	0
20	2	172.3	1	0	0
21	2	164.3	0	1	1
22	4	163.8	4	0	0
28	2	174.7444	0	1	0
35	3	147.8	0	1	1
36	3	164.675	1	1	0
37	2	167.55	5	0	0
50	4	179.675	3	0	0
52	2	171.55	1	0	1
57	3	173.925	3	0	0
58	3	128.8	5	0	0
60	5	178.4111	1	1	0
71	2	164.05	2	1	0
77	2	160.9667	7	0	0
80	4	175.425	0	1	0
83	5	159.05	0	0	1
88	1	155.8	3	1	0
91	2	158.3	4	0	1
107	4	172.64	3	1	1
118	2	166.55	4	0	1
124	1	160.3	4	0	0
128	4	176.925	2	0	1
147	3	176.55	3	0	0
164	3	172.425	7	1	1
165	2	170.17	7	1	0
169	3	173.8	6	1	1
172	1	173.46	2	0	1
174	2	174.87	3	1	0
184	5	165.925	4	1	1
187	2	172.35	0	1	1
191	1	175.05	0	0	1
197	3	164.8	5	0	1
198	1	173.425	4	1	1
203	5	153.675	0	0	0
204	3	178.3	7	0	1
205	2	180.05	3	1	0
206	3	163.925	5	1	0
207	1	172.55	6	1	1
229	3	172.8	6	1	1
233	3	164.33	2	1	1
247	4	174.925	1	1	0
258	2	176.05	5	0	0
268	2	176.9	5	0	1
272	2	153.3	3	1	0
287	1	168.55	5	1	0
290	5	170.1	4	0	1
292	1	169.175	3	0	1
295	2	155.3	4	1	1
299	5	170.925	0	0	1
309	2	172.925	3	0	0
316	3	171.05	4	1	0
317	2	156.425	6	1	0
336	2	167.925	6	1	0
340	1	171.3	5	0	0
346	1	170.175	1	1	1
362	3	163.175	4	0	0
369	4	162.175	0	1	0
374	1	168.3	3	0	1
378	3	148.05	4	0	1
383	1	170.05	6	0	0
385	4	171.34	5	0	0
388	1	167.5	4	1	1
406	2	172.05	3	1	0
407	1	175.55	2	1	0
413	3	166.175	2	1	1
416	2	177.425	4	1	0
418	3	175.4111	4	0	0
419	2	179.8	2	0	0
424	3	168.82	4	0	1
433	2	164.07	7	0	1
435	4	156.42	2	0	1
436	2	174.8	0	0	0
439	3	175.8	3	1	1
451	4	164.64	4	1	1
456	4	145.425	5	0	1
459	4	163.675	4	1	1
466	5	159.55	0	1	0
;
run;

 

 

I would like to use bootstrapped confidence intervals for the assessment of the indirect effect of mediation (i.e., the Andrew Hayes method). I know PROC CAUSALMED can handle count outcomes but not multi-categorical predictors, and Hayes' PROCESS macro can handle multi-categorical predictors but not count outcomes. Is there a way to assess mediation using bootstrapped CIs with a multi-categorical predictor and a count outcome in SAS? Thanks.

6 REPLIES 6
sbxkoenk
SAS Super FREQ

I moved your topic to the "Statistical Procedures" - board.

 

Maybe @SAS_Rob can help?

(he's getting notified by me at-mentioning him)

 

Koen

StatDave
SAS Super FREQ

Just to note something you might consider - if you have a count of some event recorded in cities and you have the population sizes, then typically the interest is in modeling the rate, count/size. Size would be used as an offset in the count model. That can be easily done by creating a variable as log(size) and then using that in the OFFSET= option in a log-linked Poisson model. For example, 

proc genmod;
model pa_days=race sex depression / d=p offset=logsize;
run;
SAS_Rob
SAS Employee

From within SAS Viya there is a BOOTSTRAP option in CAUSALMED that uses bootstrap resampling to compute standard errors and confidence intervals for causal mediation effects and decompositions.  Below is a link to the documentation.

SAS Help Center: Bootstrap Methods

confooseddesi89
Quartz | Level 8

As I mentioned in my original message, PROC CAUSALMED does not allow for multi-categorical predictors. I have a multi-categorical predictor.

SAS_Rob
SAS Employee

If you mean that it does not allow treatment effects that are more than 2 levels, then that is correct.  It does however allow multi-level predictors in the COVAR statement.  

All that being said, if you are looking for a way in SAS to fit a causal mediation model with a treatment variable with more than 2 levels, then I am afraid that is not possible.

 

confooseddesi89
Quartz | Level 8

Yes, I meant the "treatment" and not covariates in this case.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 6 replies
  • 867 views
  • 2 likes
  • 4 in conversation