I have a project related to mediation analysis with time-to-event data (Cox model is preferred), and tried to rerun the SAS code for "Example 38.5 Causal Mediation Analysis of a Time-to-Event Outcome".
https://documentation.sas.com/doc/en/pgmsascdc/v_008/statug/statug_causalmed_examples05.htm
However, it did NOT in the SAS on my computer. I got the follow error message from the log:
4546 proc causalmed data=RedDye ciratio=log poutcomemod pmedmod;
-------
22
202
WARNING: Ignoring second data set reference.
NOTE: PROCEDURE CAUSALMED used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
NOTE: The SAS System stopped processing this step because of errors.
ERROR 22-322: Syntax error, expecting one of the following: ;, (, ALL, ALPHA, CASECONTROL, DATA,
DECOMP, DESC, DESCEND, DESCENDING, EPSILON, NAMELEN, NAMELENGTH, NLOPTIONS,
NOPRINT, ORDER, PALL, PMEDMOD, POUTCOMEMOD, PSHORT, PSUMMARY, RORDER, SINGULAR,
THREADS.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
4547 class RedDye Female Tumor;
4548 model Weeks*Censor(1) = RedDye | Tumor / aft;
4549 mediator Tumor(event='1') = RedDye(treat='3');
4550 covar Female;
4551 freq Freq;
4552 run;
Could anyone please let me know why this happened? How can I fix it? Or you can suggest other procedures. Thank you very much.
Some of these options were added in SAS Viya 2020.1 and might not work in SAS v9.4-based systems.
See What's New and search for CAUSALMED.
Excerpt:
The following enhancements have been made to the CAUSALMED procedure:
So is there a way to run PROC CAUSALMED with time-to-event data in SAS v9.4-based systems?
I just answered this for myself. The answer is no, referencing this thread:
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.