BookmarkSubscribeRSS Feed
SASUser41
Calcite | Level 5

Hello,

 

I am trying to use the findcut macro at SAS studio, but I am not being able to get any results. Do anyone have experience with this macro?

4 REPLIES 4
Tom
Super User Tom
Super User

To get an answer you will need to provide much more information.

1) What is the %FINDCUT() macro?  Where is the source code so others can look at it? What does it do?

2) How did you try to use it?

3) What does your data look like?

4) In what way did it not work?  

  • Did it fail?
  • Produced different results than you want?
  • Do nothing?
  • ???
Cynthia_sas
SAS Super FREQ
Hi Tom,

Thank you for your answer. The %findcut macro is used to identify a cutpoint when the outcome of interest was measured as time to event (survival). Thus, the macro was written to implement outcome oriented methods proposed by Contal and O’Quigley (1999), which is based on the log rank test statistic. More information on it is available here: http://www.sascommunity.org/mwiki/images/0/01/Findcut_Final_Paper.pdf

I am trying to use this macro in order to determine a cutpoint for a continuous variable and I have the event (outcome) and time to event variables.

The basic code for the macro is: http://bioinformaticstools.mayo.edu/research/findcut/ (SAS macro download)


%findcut (ds= , time= , stat= , cutvar= , maxtime=, printop=, residop=, plottype=);

This macro finds a cutpoint for a continuous variable with a time to event outcome.

Parameters:

ds = name of the dataset

time = variable containing the time to event information

stat = the status or event indicator, for example, 1=event or 0=no event

cutvar = the continuous variable for which the cutpoint is to be determined

Optional Parameters:

maxtime = Time point (in days) to get % survival, default is 182.5 days (i.e. 6 months)

printop = basic summary statistics. 0 is default.

1=proc univariate on a continuous cutvar

2=proc freq on a ordinal cutvar

0=No print

residop = Requests martingale residual plot.

0=No Martingale residual plot

1=plot Martingale residual plot

plottype = Requests the minimum p-value and the maximum hazard ratio plots. 1 is default

0 = No plot

1=prints to the greenbar printer

2=prints to the Unix laser printer

(Note: This option may not be relevant for users outside of Mayo)

I am absolutely new to SAS and I am trying to use SAS Studio to run this analyses. When I fill the macro spaces with the info from my dataset and variables and run it, nothing happens and I get no results.

Thank you so much!
Tom
Super User Tom
Super User

I am absolutely new to SAS and I am trying to use SAS Studio to run this analyses. When I fill the macro spaces with the info from my dataset and variables and run it, nothing happens and I get no results.

One common error is to mistakenly edit the macro definition instead of the macro call.

Do not modify the code you downloaded that defines the macro.  It will start with %MACRO statement and ends with %MEND statement.

Instead after running that code add a call to the macro that looks like:

%findcut (ds= , time= , stat= , cutvar= , maxtime=, printop=, residop=, plottype=);

Is in this call to the macro that you will insert your values for the macro parameters. Like the name of the input dataset.

 

SASUser41
Calcite | Level 5

Thank you SO much, Tom! It worked!!!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1915 views
  • 0 likes
  • 3 in conversation