BookmarkSubscribeRSS Feed
Lyansu
Calcite | Level 5

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.

 

3 REPLIES 3
ChrisHemedinger
Community Manager

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:

CAUSALMED Procedure

The following enhancements have been made to the CAUSALMED procedure:

  • The procedure now supports the causal mediation analysis of time-to-event outcomes. You can specify the following two types of models for the time-to-event outcome in the MODEL statement:
    • Cox proportional hazard models (with the COXPH option)
    • accelerated failure time models (with the AFT option)
  • The new CIRATIO= option enables you to compute confidence intervals for ratio-type causal mediation effects on the log scale, original (nontransformed) scale, or both. The z-value and the p-value for testing null hypothesis of no effect are also computed separately for each of the chosen scales.
  • You can now specify the treated or control level of a binary treatment variable by using the TREAT= or CONTROL= option, respectively, in the MEDIATOR statement. You can specify the event or reference level of a binary outcome variable by using the EVENT= or REF= option, respectively, in the MODEL statement.
Register for SAS Innovate 2025!! The premier event for SAS users, May 6-9 in Orlando FL. Sign up now for the best deals!
soosas
Fluorite | Level 6

So is there a way to run PROC CAUSALMED with time-to-event data in SAS v9.4-based systems?

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2160 views
  • 3 likes
  • 3 in conversation