Proc lifetest y axis range 2279 years for AML-high risk patients. templat. Overview: LIFETEST Procedure; Getting Started: LIFETEST Procedure of the X-axis or Y-axis to the origin. I want both the x-axis and y-axis to start at 0, so I set viewmin=0 and offsetmin=0 for both the x-axis and y-axis. I am not using gplot graph to make the graph, I am using proc lifetest. Code: /*/ proc lifetest data=mukm; time week*censor(1); strata I've used SAS macros %ProvideSurvivalMacros and %CompileSurvivalTemplates in the past to customize the plot that PROC LIFETEST generates. In figure 2, the summary statistics is located at the bottom left corner PROC LIFETEST does not make any adjustment for the nondecreasing behavior of the confidence bands in the OUTSURV= data set. The event of interest is Many functions in the procedure are very nice, and the modularized templates would be very useful if I could point the 'proc lifetest' procedure to work. Change Axis using an XAXIS notation. It's at the bottom of the page. The Kaplan-Meier plot (also called the product-limit survival plot) is a It is correct that the x-axis spans the full range of both censored and uncensored survival times. All statements except the TIME statement are optional, and there is no required order for the statements that follow the PROC LIFETEST statement. I divide the data into 4 groups of x-values--the by statement divides the data such that each panel displays the entire common range (see attach). I was able to change the X axis. libname hot 'c:\hot\matange\data'; The y-axis min is determined by data range and is not zero. Note, the y-axis label is closer to the y-axis tick values. time T * Status(0); . Event. 1. alternatively, you can output the data from Proc Lifetest and then calculate 1-s(t) to estimates are useful and easily generated through Proc Lifetest, reviewers often require Modify the y-axis so that it only displays the survival estimates between a specified range and add horizontal reference lines. proc lifetest data = sashelp. This post will familiarize you with that chapter. Sometimes, however, you might want to specify a set of custom tick values for one or both axes. Figure found online Hello - I have a dataset that looks like the below and a simple lifetest code. Does anyone have any recommendations? I considered using the % The survival plot is produced by default; other graphs are produced by using the PLOTS= option in the PROC LIFETEST statement. Compile the template which will save it to your This sample illustrates how to change the range of the X and Y axis on a survival plot that is produced with ODS Graphics and PROC LIFETEST. 1); proc lifetest data=event_data method=KM CONFTYPE=LINEAR outsurv=survival_data plots=survival; RUN; ODS GRAPHICS OFF ; PROC LIFETEST DATA=lifetable NOTABLE OUTSURV=ltpoints (WHERE= (_censor_ ne 1) ); TIME tallcvd*allcvd(0); STRATA active; TITLE 'Results from PROC LIFETEST - Output plot points'; RUN; PROC PRINT DATA=ltpoints (OBS=20); TITLE 'Display of Life Table Points'; RUN; PROC SGPLOT DATA=ltpoints; XAXIS label = 'Years of Follow-up The PROC LIFETEST statement invokes the LIFETEST procedure. 0)); %CompileSurvivalTemplates proc lifetest data=sashelp. Modifying the axes: This part explains the options that control the X and Y axes, and shows how to modify the ticks and axis labels. The same options are often repeated in multiple statements. for the minimum: the The LIFETEST Procedure can do what you asked for. Begin by including the macros that you copied in the section The Modularized Templates. The axis table statements available with the SGPLOT procedure make it easy to add such data to the graphs. agecat1 max= 12 min=3; agecat2 max=20 min=6, agecat3 max=20 min=5 agecat4 max=24. proc lifetest data=AP_PDAC plots=(survival(atrisk) logsurv); time Dur_Yrs*PDAC(0); strata AP; run; 0 Likes Reply. I want to have consistency between them all and to show a 500 interval on the Y axis and a max interval of 4,000. I would suggest exploring the Examples and Videos sections from the documentation. Why does the resulting graph show "day" on the x axis when it should be "week"? Any easy way to fix? I'm using SAS for Academics/Studio/Learner. When I looked at the macro code I realized that this is because they are modifying the survival plot template. Changing the Homogeneity Test Inset. 0335 years for AML-low risk patients, and 7. The code that was implemented to alter the graph template is illustrated Y-AXIS OPTIONS %let yOptions = label="Disease-Free Survival" shortlabel="Survival" labelattrs=(size=10pt weight=bold) I am struggling with changing Y-axis for my KM curves. CLASS data set: proc sgplot data=sashelp. The proportion of subject s surviving past 15 months is over 50% for treatment group 2. • Using the EXP function, calculate the antilog of mean and SD obtained from PROC MEANS. This time, the result is the customized graph (see Figure 2). 0 to 1. Optionally, this statement identifies an input and an OUTSURV= data set, and specifies the computation details of the survivor function estimation. BMT plots=survival(cb=hw test); time T * Status(0); strata Group; run; Figure 23. Previous Page | Next Page | The LIFETEST Procedure In SAS, The LIFETEST procedure generates the time-to-event summary statistics and performs statistical tests. I want the y-axis of a KM survival curve to display percentages from 0 to 100%, in intervals of 10%. I used viewmin, viewmax, offsetmin, and offsetmax to better control my axes. 4. 2 instead of 0? here is my statement : proc lifetest data=test plots=survival(cb=hw test); time period1 * outcome1(0); strata drug; run; PROC LIFETEST computes linear rank statistics to test the effects of these covariates on survival. Table 52. I attached my code below, hope it can help . 1 summarizes the options available in clinical trial to analyze the time to event data, in which time is plotted on X axis and percentage of individual surviving in proportion to time are plotted on Y axis. The MDS Procedure. Example code for an unstratified analysis: ods output quartiles=quartiles homtests=homtests_unstrat; proc lifetest data=adtte method=km; time aval*cnsr(1); strata trt01pn; run; To get started, I have extracted the data needed for the graph by running the LIFETEST procedure using the BMT data set. how do i do this in the below proc lifetest code? i tried yoptions, xoptions, plot option, but nothing seem to work. Registration is now open for SAS Innovate 2025, our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9. Suppressing the Second Title and Adding a Footnote. The life-table estimator is a grouped-data SAS/STAT® 15. Any solution or suggestion about customizing the CIF? I am using proc lifetest to create survival plots. By default, BANDWIDTH= RANGE(0. For example, would it be possible to make the y-axis start from 0. Those are the steps you need to follow. PROC LIFETEST DATA=combo_by_state. I have not had success following the SAS documentation and I am not well versed in proc template. Week. This one fixes the "0" and puts the subjects at risk closer to the curves. The median survival is estimated by locating 0 The LIFETEST Procedure: The LIFETEST Procedure. The XAXIS, X2AXIS, YAXIS, and Y2AXIS statements specify options for the plot axes. For example, the following call to PROC SGPLOT specifies that the ticks on the Y axis should be specified at the locations -0. proc lifetest data=bmt plots=(survival); time ftime*Status(0); strata diagnosis; run; Many functions in the procedure are very nice, and the modularized templates would be very useful if I could point the 'proc lifetest' procedure to work. On the one hand, you say that "t he medical condition concerned is highly fatal," but on the other hand, your PROC MEANS table states that only 48/2765=1. I’m trying to change the legend label of the PROC LIFETEST procedure’s graph result. symbol1 c=blue; symbol2 c=orange; proc lifetest data=Exposed plots=(s,ls,lls); time Days*Status(0); strata Treatment; run; The PLOTS= option in the PROC LIFETEST statement is used to request a plot of the Kaplan-Meier Survival Plot in PROC LIFETEST with ODS Graphics to compare different treatment groups based on the log-rank test. 2 to have an increment of 0. proc lifetest data=sashelp. Here is an example that you should be able run as you should have the SASHELP. Let be the time range for the confidence band so that is less than or equal to the largest event time. See the section Modifying the Axes in Chapter 22, ODS Limiting the X-axis Range in Proc Lifetest Posted 08-15-2017 03:53 PM (4954 views) I'm trying to limit the survival estimates graph to only display data up to 72 hours. that is allowed in plots so that outlying points do not determine the scale of the time axis of the plots. However my plot is coming as very small in rtf ouput. In the following example layout block, even though the Y and Y2 columns are different, the primary and secondary Y axes represent the same data range in different units. The STRATA statement specifies a variable or I'm using Proc SGPLOT to create several VBAR graphs. See Chapter 49, The LIFETEST Procedure, for more information. You can use a heat map to visualize correlation matrices, to visualize longitudinal data ("lasagna plots"), and to visualize counts in any two-dimensional table. proc lifetest data=combo_by_state; time survt*event(0); strata state; Getting Started: LIFETEST Procedure You can use the LIFETEST procedure to compute nonparametric estimates of the survivor functions, to compare survival curves, and to compute rank tests for association of the failure time variable with covariates. BMT plots=survival(cb=hw test); time T * Status(0); strata Group; run; You can change any of these values in several ways: You can specify literal values or macro variables when previously a dynamic variable was used. In general, run proc template once to get the source code. 606 (95% CI) (0. The following statements modify the default tick value list for the Y axis from the default increment of 0. You can control the features of the axis (for example, the axis label, grid lines, and minor tick marks) and you can also control the structure of the axis (for example, the data range, data type, and tick mark values). 4 . PROC LIFETEST in SAS/STAT® 13. BMT plots=survival(cb=hw test); . maximum value of the time variable allowed on the plots so that outlying points do not determine the scale of the time axis of The output data from PROC LIFETEST will be explained. The options listed in Table 49. The LIFETEST Procedure. In many of my studies they also start from 1. /*SAS PROC LIFETEST Survival Plot Template Modifed by: F. 6 . 1 added many options to control To change titles, add title, Y-axis and X-axis: %let tatters = textattrs=(size=12pt weight=bold family=’arial’); %let TitleText1 =” SUGI estimates over time by treatment. For charts, the omitted values are still included in the statistic calculation. When the DATA step finishes, SAS submits all the code in the buffer, which modifies the template. The STRATA statement specifies a variable addition a presentation for extracting these statistics from PROC LIFETEST is given so the programmer can move from concept to usage. SurvivalPlotData; proc lifetest data=sashelp. BMT plots=survival(atrisk=0 to 2500 by 500); time T * Status(0); strata Group / test=logrank; run; where denotes the survivor function and is the lifetime of a randomly selected experimental unit. 1 summarizes the options available in My x-axis still showing 0 to 180 by intervals of 50 (I want intervals of 30). Those options are sufficient for most purposes. 1 are available in the PROC LIFETEST statement and are described in alphabetic order. strata Group; run; The results are displayed in Figure 21. Home; Welcome. I am getting 0 to 1 survival probability on Y axis. Hassard , N. i want y-axis to be flipped; instead of 0 to 1, i want it to show 1 to 0 (to have the curve flipped). Below is an example Kaplan-Meier curve, with the x-axis representing time-to-event in years and y-axis representing probability of survival. Specifically, confidence interval is a very commonly requested addition to aid the interpretation of survival analysis data. For example, consider the results of a small randomized trial on rats. 5, 9, and 12. 25 and also change the Y-axis label to 'Survival': The y-axis line and ticks are removed. Dataset columns: ID. To display a list of current AXIS definitions in the LOG window, use the GOPTIONS procedure with the AXIS option: proc Why did you specify the y-axis to increment by a negative value, instead of a min to max by inc, where inc is positive? Specifying VALUES=(60 to –100 by –20) or VALUES=(-100 to 60 by 20) should give you the same result Many functions in the procedure are very nice, and the modularized templates would be very useful if I could point the 'proc lifetest' procedure to work. For the Hall-Wellner How to make x-axis and y-axis meet at (0,0) using proc lifetest Posted 04-30-2022 02:26 PM (1361 views) I use Proc Lifetest to create KM curves by using SAS macro but I cannot find a easy way to make x-axis and y-axis meet at (0,0) to the bottom left corner using lifetest and sas macro. com. LIFETEST PROC can also be used to compute nonparametric estimate of the survivor function by the life table method. ProductLimitSurvival) produced by SAS's %ProvideSurvivalMacros macro. 0 Likes Reply. In this framework, the Per the statement name, an X/Y axis aligned row of textual data is placed at specific locations in relation to a primary plot within a given SGPLOT procedure. Then you run the procedure, which uses the modified template. Kazarinoff, Y. 1 provides many new options for Kaplan-Meier plot modification, I'm capturing the output of proc lifetest through ods. 3) I am using below options. You can display the Kaplan-Meier plot that contains step functions representing the Kaplan-Meier The following statements modify the default tick value list for the Y axis from the default increment of 0. Also I will like to output the following: the number of censoring events, the number of events and the probabilities of events at predefined time points (e. This sample code first uses PROC MEANS to calculate the minimum and maximum values in the input data set. Is there a way to use an updated confidence interval with the aid of SAS® procedure PROC LIFETEST, and how to use the Miettinen-Nurminen the y-axis is "bent" so that the area of interest can distinguishably stand out while preserving the original range and shape proportionally. However I need 0 to 100 percent on Y axis. 4m3, you could create I’m on a project now which is related to pharmaceutical industry. Note, the y-axis label is still pushed out to the left. I am looking for generating Survival curves for time to cancer (not death), cumulative incidence graphs and Hazard Ratio graphs. ods output Survivalplot=data. Ensure graph matches output from PROC LIFETEST. Many thanks. options orientation=landscape papersize=LETTER nodate nonumber 1. 6975 years for ALL patients, 7. Graphics. BMT plots=survival(atrisk=0 to 2500 by 500); Note, the placement of the y-axis label farther away from the y-axis values. You can add a horizontal reference line to the survival plot by adding the following statement to the template: %CompileSurvivalTemplates proc lifetest data=sashelp. proc lifetest data=bmt plots=(survival); time ftime*Status(0); strata diagnosis; run; data in the graph, usually aligned with the x or y axis. The TIME statement is used to specify the variables that define the survival time and censoring indicator. 2) How to get survival probabiliy in percents on KM plot. You can reference every graph produced through ODS Graphics with a name. See the section Modifying the Axes in Chapter 22, ODS The PROC LIFETEST statement invokes the LIFETEST procedure. Copy it and find where it Limiting the X-axis Range in Proc Lifetest Posted 08-15-2017 03:53 PM (4939 views) I'm trying to limit the survival estimates graph to only display data up to 72 hours. My original survial time data was in seconds so I converted it to hours and altered the template to have a viewmax=72. In this instance different data columns are mapped to the Y and Y2 axes. 1 b,0. However, I don’t have permission to compile the template in SASUSER . You can use PROC LIFETEST to compute the Kaplan-Meier (1958) curve, which is a nonparametric maximum likelihood estimate of the survivor function. The PROC LIFETEST statement invokes the procedure. %ProvideSurvivalMacros %let yOptions = label="Survival" linearopts=(viewmin=0. If no options are requested LIFETEST procedure lacks the functionality necessary for the request. 4m3, you can create heat maps in SAS by using the HEATMAP and HEATMAPPARM statements in PROC SGPLOT. These options are described in alphabetic order. 3 User's Guide documentation. BMT plots=survival(cb=hw test); time T * Status(0); strata Group; run; proc lifetest y-axis start on zero Posted 05-23-2020 12:55 PM (601 views) ods graphics on; proc lifetest data=matched3 method=km atrisk plots=(S(test nocensor atrisk=0 to 3000 by 500)) method=km MAXTIME= 3000 intervals=(1 to 3000 by 500); time period2*outcome2(0); strata drug/ adjust=sidak test=logrank;run; ods graphics off; 1. This first one fixes the "0" issue, and still puts the table of subjects at risk at the bottom. 5. This means that these macros cannot be applied when creating a failure plot instead of a survival plot. Introduction In most pharmaceutical company, statistician and programmer work together for statistical months on the X axis and reading up to the Y axis. I run the PROC LIFETEST procedure below to get the KM plot. Apologies for the test data - I can't get the dates to go in properly - any help to get this right would be appreciated. how do i do this in the The following statements use PROC LIFETEST to compute the product-limit estimate of the survivor function for each risk category: proc lifetest data = sashelp. The PROC ICLIFETEST statement invokes the ICLIFETEST procedure. linearopts=(viewmin=0 viewmax=2500 If you use the Proc Lifetest, you can draw the failure plot instead of the survival plot. title 'Product-Limit Survival Estimates'; 注意,类似修改坐标一类,在定义的统计制图里(从proc而来),通常不容易,也常常不必要。我只记得可以在proc univariate里利用vaxis=axis1 之类的选则来重新定义y轴(x轴好像还不适用)。其它的都不是轻而易举的。 sxlion 和oloolo说的都不错。 Adding a Y-Axis Reference Line. 1 is generally used to generate Kaplan-Meier Survival Plots it can also generate ‘Failure’ plots. I would not use sgplot to make it. I am using the fo Adding a Y-Axis Reference Line. proc lifetest data=bmt plots=(survival); time ftime*Status(0); strata diagnosis; run; specify the axis options for each plot axis. The names of the graphs that PROC LIFETEST generates are listed in Table 51. A basic example of KM curves and log-rank test: ods graphics on; proc lifetest data=sashelp. PROC LIFETEST, like other statistical procedures, provides a PLOTS= option and other options for modifying its output without requiring template changes. The PROC LIFETEST statement invokes the LIFETEST procedure. ods graphics on; ods output hazardplot=work. The LOESS Procedure. When used in conjunction with other plot statements it is easy to see the value that PROC LIFETEST, like other statistical procedures, provides a PLOTS= option and other options for modifying its graphical output without requiring template changes. If you download the code in the blog post referenced it has the fully worked example INCLUDING the PROC LIFETEST portion and the graphing code. The x-axis line is drawn only to the extent of the data using AXISEXTENT=Data. Modify the y-axis so that it only displays the survival estimates between a specified range and add horizontal reference lines. When the procedure options are insufficient, you can modify the graph templates by using SAS macros. (5) the x-axis time range must be displayed from Month 0 to the maximum event time; (6) the y-axis ticks must be displayed from 0% to 40% in intervals of 5%; (7) the x-axis and y-axis labels must be customized; and (8) a failure curve with a 95% confidence interval is required. I need help The LIFETEST procedure is a nonparametric procedure for analyzing survival data. As you can see the following image, the legend labels seem as Kras=-1 Kras=0 Kras=1 however I need to see the reports as Unknown(Kras=-1), Negative(Kras=0) and Positive(Kras=1). However, I am getting these strange lines from the end of the curve (as shown below). You can control the contents of the survival plot by specifying procedure options in PROC LIFETEST. Right now the data is displaying unto 100 hours. 0 in increments of 0. You can add a horizontal reference line to the survival plot by adding the following statement to the template: * modify y-axis label and display as percentage instead of fraction; %let xOptions = label="Disease Free Time (days)" offsetmin=0. Run PROC LIFETEST with the modification I suggested. Is it possible to have each panel with its own range such that the detail within the range is . Graphics The PROC LIFETEST statement invokes the LIFETEST procedure. This might be challenging if you are not familiar with GTL. Dear Sir/Madam, Could you please provide me a PDF copy of the book "Theory and applications of Hopf bifurcation" B. For example, if the data range is 1 to 10 and you specify ORDER=(3 TO 5), only the data values from 3 to 5 appear on the plot or chart. You can read through the comments and make changes as required. This code creates an optimal scale for the time or x-axis; optimal being defined as inclusive The PROC LIFETEST statement invokes the procedure. D. 6 months, 12 months, 18 months, 24 months, 30 month Hi All, I am producing a a Kaplan Meier plot with confidence bands using the Proc Lifetest procedure. Consider a sample of I am having the same problem as the original poster, but I cannot get the TICKVALUEFORMAT option to work. Above we described that integrating the pdf over some range yields the probability of observing \(Time\) in that range. I use Proc Lifetest to create KM curves by using SAS macro but I cannot find a easy way to make x-axis and y-axis meet at (0,0) to the bottom left corner using lifetest and sas macro. Now I'm generating a Failure plot with LIFETEST, and I found that these macros have no effect. 2 viewmax=1 tickvaluelist=(0 . 15))); Time ttpfs*pfs(0); strata randtrt; run; ODS graphics off; It gives me the KM curve but I would like to edit : y axis - instead of 0. Please find an attachment with display of plots. is placed inside the graph, in the INNERMARGIN as shown earlier. Getting Started; Community Memo; All Things Community; SAS Customer Recognition Awards (2024) SAS Customer Recognition Awards (2023) SAS Community Library; Tips for Creating Oncologic Efficacy Summary Tables using PROC LIFETEST and PROC PHREG Scott Michael Ward, i3 Statprobe, Cary, North Carolina ABSTRACT RANGE 2. proc lifetest data=combo_by_state; time survt*event(0); strata state; Note, the y-axis ticks are get bit longer. I am trying to adjust the start of the survival curve in proc lifetest statement. Want to Modify Some Basics Change Axis to % 7 . 5, 0, 0 This is in addition to the chapter on PROC LIFETEST. sas. The MCMC Procedure. The LOGISTIC Procedure. However, I'm unable to find an easy way to do so. It has 36 Kaplan-Meier plots of various forms. The options listed in Table 51. I would love to get help from you all. BMT plots=survival(atrisk=0 to 2500 by 500); time T * Status(0); The PROC LIFETEST statement invokes the LIFETEST procedure. Table 56. 5, 5, 7. 2 . Table 70. Optionally, this statement identifies an input data set and an output data set, and specifies the computation details of the survivor function estimation. Adding a Y-Axis Reference Line Changing the Homogeneity Test Inset Determining the Time Axis To determine the time axis scale, especially the maximum scale and the appropriate interval for readable information to be printed below the time axis, the algorithm from Li was used to determine the maxscale, interval, etc. You can use PROC LIFETEST to compute the Kaplan-Meier curve (1958), which is a nonparametric maximum likelihood estimate of the survivor function. In this example, we have output the data from PROC LIFETEST (Example 49. I want to change proc lifetest y axis. 0)); %CompileSurvivalTemplates . Now, change the yaxis viewmin=0. H. But I want the time interval to be 3, which c Hi Reeza, I reset the template to default and changed ONLY the X axis ticks. 0+ - 963. Thus, we define the cumulative distribution function as: \[F(t) = \int_0^tf(t)dt\] Many functions in the procedure are very nice, and the modularized templates would be very useful if I could point the 'proc lifetest' procedure to work. This example shows ways that you can change the template when those options are By default, PROC LIFETEST assigns a description of the form PLOT OF vname versus hname, where vname and hname are the names of the y variable and the x variable, respectively. However, you will find that the time points along the x-axis are 0, 2. BMT plots = survival (cb = hw failure test atrisk (outside maxlen = 13)); time T * Status (0); strata Group; run; The graph is displayed Such graph can be produced with PROC SGPLOT using the Y2AXIS statements. Suppose you randomize 40 rats that have been exposed to a carcinogen into two treatment groups (Drug X and Placebo). I need to increase the size of output. PROC LIFETEST computes the product-limit estimate for each stratum and tests whether the survivor functions are identical across strata. Copy and paste code from blog post, change variable names to match yours. The following specification changes the ticks In this paper we show how to customize survival curves using PROC GPLOT. Community. I prepared • Calculate the mean and SD for variable Y using PROC MEANS. SAS Graph Templates I want to change the y and x-axis parameters on the hazard function plot (I need to re-label and change the tick marks). I want to change the minimum on the y-axis from 0 to, say, 0. Getting Started; proc sgpanel y-axis with multiple scales Posted 01-08-2018 08:24 AM (16448 views) I'd like use multiple scales on y-axis using below max min values. See the LINEAROPTS= option within the YAXISOPTS= and XAXISOPTS= options in I want the y-axis of a KM survival curve to display percentages from 0 to 100%, in intervals of 10%. By default, PROC LIFETEST assigns a description of the form PLOT OF vname vs hname, where vname and hname are the names of the y variable and the x variable, respectively. The program to create the survival plot for the BMT data is shown in Figure 1. 2 1) We associate this plot with the Y2 axis so its data range will not be merged with the “Survival” data on the Y axis. Y The time to event is defined as the assessment time at which the lower limit of the I have run proc lifetest to generate Kaplan Meier curves, and I managed to use Proc template to change the format of my x-axis, y-axis, entrytitle, etc. These values are then used to create two macro variables, which are then used with the ORDER= option on an AXIS statement with PROC GPLOT to set the horizontal axis range. Survival here denotes the time to an event, such as death, and the plot is descending Also further assume that every failure plot that is going to be produced will need to have the y-axis tic marks at Customizing the Kaplan-Meier Survival Plot. Khurshed Date: July 27, 2011 Description: I modified the basic GTL plot to 1) Changed the thickness of the lines plotted 2) Changed the X axis markers to 12 month The LIFETEST procedure is a nonparametric procedure for analyzing survival data. Censor. I need to customize the tick interval on a survival plot for the x axis such that the ticks have values of 0 to 18 by intervals of 1. 2. Optionally, this statement identifies an input data set and an output data set, and specifies the computation 1. 0)); %CompileSurvivalTemplates However, I don’t have permission to compile the template in SASU Here's some old code I had- changed it to months. class; scatter x=height y=weight; dropline x=60 y=100 / dropto=both; run; This uses the BOTH option for drop to. 1. The MIANALYZE Procedure. Most conventional approach to generate survival plot is by outputting ODS survival dataset from PROC LIFETEST Procedure and using PROC GPLOT procedure of SAS/ Graph software. Ie using the SAS valung dataset from the documentation ods The option 'range' in proc phreg only control the x range not y range. Another request that comes up is about the distance of the y-axis label from the y-axis tick The LIFETEST procedure in SAS/STAT is a nonparametric procedure for analyzing survival data. You could add 1 to your AE start days and finish days. Wan , London Mathematical Society Lecture Note Note that the range of each curve is from 0 to the largest observed time of the corresponding disease group, which is 5. If you want to use the log scale, then you cannot have 0 or negative numbers. It's exactly what I would do if I was trying to make an example for you to follow. The following statements modify the Y axis so that tick marks start at 0. 2: %ProvideSurvivalMacros %let yOptions = label="Survival" linearopts=(viewmin=0. hazard; proc lifetest data=mydata plots=hazard; time survivaltime*status(0); run; ods graphics off; The example on modifying the EFFECTPLOT shows how axis range and labels Figure 1. This is due to the Hi there, I have been struggling with this problem for a while. I'd like use multiple scales on y-axis using below max min values. 0+ - 966. adtteeff plots=survival(atrisk=0 to 210 by 30); time aval * cnsr(1); strata trtpn; For example, you may want to show different axis tick values than those that Proc LIFETEST automatically generates, as seen in our example where we want the axis tick values to go from 0 to 210 by 30 instead of 0 to 200 by 50 (which I used the macro for KM plots for PROC LIFETEST but can't find a way to modify this plot (range for x and y axis) Thank you . I figured out how to change the range of the Y-axis for PROC LIFETEST using the macro from: Getting Started: LIFETEST Procedure You can use the LIFETEST procedure to compute nonparametric estimates of the survivor functions, to compare survival curves, and to compute rank tests for association of the failure time variable with covariates. If no options are requested, PROC LIFETEST computes and displays the product-limit estimate of the survivor function; and if an ods graphics on statement is specified, a plot of the estimated survivor function is also displayed. 7 One of the most popular graph amongst clinical and pharmaceutical users is the Survival Plot as created from the LIFETEST Procedure. However, the adjustment was made in the display of the confidence bands by using ODS Graphics. This might be an analysis of 6 patients’ time to death following The Survival Plot is automatically created by the LIFETEST Procedure. Our emphasis is on simple examples that make small changes one at a time and not on hard-to-follow macros. For e. In the SAS PROC LIFETEST, the TIME statement is used to indicate the time-to-event variable and followed censoring mark (‘+’). 0 2. Table 58. As of SAS 9. Figure 17: Failure Plot with At-Risk Table Outside. 0 UNSTRATIFIED ANALYSIS HAZARD RATIO (RELATIVE TO PHARMA_1) 0. Once the template has been altered, we run the same PROC LIFETEST code as before. “anno_xinterval” and “anno_yinterval” indicates the column or row interval in percentages of the X-axis and Y-axis respectively. This is one graph that users most often want to customize. The Kaplan-Meier plot (also called the product-limit survival plot) is a I am trying to get SGPanel to produce a scatter plot graphs in 4 panels with different x-axis scales. See the LINEAROPTS= option within the YAXISOPTS= and XAXISOPTS= options in the LAYOUT OVERLAY statement in the Stat. AXIS1 and AXIS2 statement are used to control the details of x and y axis such as ranges and Hello @csa,. Sample 43910: Customize the axis range of a survival plot This sample illustrates how to change the range of the X and Y axis on a survival plot that is produced with ODS Graphics and PROC LIFETEST. The following statements modify the Modifying the axes: This part explains the options that control the X and Y axes, and shows how to modify the ticks and axis labels. I want to create failure plots (by using PROC LIFETEST and plots=survival(failure)) and change the y-axis. There are instructions on how to do so for PROC LIFETEST but the process is similar for PROC PHREG. maximum value of the time variable allowed on the plots so that outlying points do not determine the scale of the time axis of It has the full Y-axis range of 0 to 1. The DESCRIPTION= option cannot be used if you specify the LINEPRINTER option or Is there a way to change the legend title in PROC LIFETEST without going into proc template? It seems weird that it doesn't pick up the variable label. You can change the fonts for the tick values by using the TICKVALUEATTRS= option for both the X and Y axes. The code for the LIFETEST procedure step is shown in Figure 4. 74% of the subjects died before end of follow-up, given that vital_status=1 means death. The lifetest procedure code is: /*** Compute Kaplan Meier Statistics ***/ ods rtf file = "(directory pat I want to change proc lifetest y axis. There was a mistake in my code, I added the word DATA to the , it should be: ods output survivalplot = survivalplotData; Dear all, how do I add median survival, confidence interval to a Kaplan-Meier curve. BMT plots=survival(atrisk=0 to 2500 by 500); time T * Status(0); strata Group / test=logrank adjust=sidak; PROC LIFETEST, like other statistical procedures, provides a PLOTS= option and other options for modifying its output without requiring template changes. When you create a graph by using the SGPLOT procedure in SAS, usually the default tick locations are acceptable. Longer y-axis tick marks are created at each value using multiple DROPLINE statements. Graphics To be consistent with other quantile estimates (such as the median) using the Kaplan-Meier method -- see the "general formula for estimating the 100pth percentile point" in section Breslow, Fleming-Harrington, and Kaplan-Meier Methods of the PROC LIFETEST documentation and consider the cases p → 0 and p → 1 -- I would use. Those options are sufficient for most purposes, and the following subsections of the section Controlling the Survival Plot by Specifying Procedure Options in Chapter 23: Customizing How do I keep the scale of y-axis from 0 to 10 but only display tick values at 2 4 6 8. 1 summarizes the options available in the PROC LIFETEST statement. It seems I can use macros to change it. I also tried ods, but can't get it work. Lifetest. Axis tables can also be used for proc lifetest data=sashelp. Plasma concentration plotted on y-axis, time-points on x-axis for 10 subjects will constitute a quartiles range and the values beyond those points are denoted by a specified analysis results using PROC LIFETEST. Default graphical outputs by PROC LIFETEST are adequate for assessing simple outcomes; however, presentation of analysis results often requires various and complex customizations. 8 1. The MIXED Procedure. 1 summarizes the options available in The PROC LIFETEST statement invokes the procedure. Want to Modify Some Basics Change Line Type and Colour 8 . 25 and also change the Y-axis label to 'Survival': %CompileSurvivalTemplates proc lifetest data=sashelp. changing the title of the graph, the thickness of the graph lines, whether the graph lines are dashed, etc. All statements except the TIME statement are optional, and there is no required order for the statements following the PROC LIFETEST statement. The following step uses the modified template and creates a plot that has percentages on the Y axis: proc lifetest data = BMT plots = survival (cb = hw atrisk (maxlen = 13)); time T * Status (0); strata Group / order = internal; format group bmtfmt The LIFETEST Procedure In SAS, The LIFETEST procedure generates the time-to-event summary statistics and performs statistical tests. proc lifetest data=bmt plots=(survival); time ftime*Status(0); strata diagnosis; run; The PROC LIFETEST statement invokes the LIFETEST procedure. The curve lines use colors and line patterns, which is not optimal for a step plot. 6, along with the required keywords for the PLOTS= option. The new release of SAS/STAT ® 14. Essentially, I want to have 5 intervals (from 0 to 10) instead of 3, so my scatter plot is placed in the middle of the graph instead of being more spread out. 25 b), where ; analysis results using PROC LIFETEST. The survival plot template in PROC LIFETEST is long, and it has distinct components for different scenarios (single stratum versus multiple strata). My dataset has only 4 observations at (2 4 6 8). The MI Procedure. SAS Innovate 2025: Register Now. The changed syntax is highlighted in the code. Figure 1 I'm doing some analyses where the survival function remains quite high over time. Modifying the Y Axis. proc format; value trtfmt 0='Placebo' 1='Treatment'; run; %KMPlot( However, these macros do not affect any graph that uses graph templates other than those described in the link. Using dataset Valung from proc lifetest help menu Title 6 . Example code for an unstratified analysis: ods output quartiles=quartiles homtests=homtests_unstrat; proc lifetest data=adtte method=km; time aval*cnsr(1); strata trt01pn; run; You can provide and X,Y coordinate and "drop" a line to either the x axis, the y axis or to both. g. Control whether and how the censorings appear on the figure. If PROC lifetest data=solo2_date plots=survival (test atrisk (maxlen=8 outside (0. Example of standard Proc Lifetest figure HOW TO IMPROVE ON THIS This figure would be improved by the following enhancements: 1. 816) Particular emphasis is given to proc lifetest for nonparametric estimation, and proc phreg for Cox regression and model evaluation. See the plot in the attachement. 450, 0. 5 in both places in the code. Prior to SAS 9. . In this example, title is not used and only one footnote is diaplayed with default font size. I am You can change the range of the vertical axis or the ticks in either version of the template by changing this option everywhere that it occurs. Heat maps have many uses. For simple analyses, only the PROC LIFETEST and TIME statements are required. 2 , i would like 0 to 100 in increments of 20 (%) Although PROC LIFETEST in SAS/STAT® 13. Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers; Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand; OverflowAI GenAI proc lifetest data = adam. If no options are requested I'm attempting to customize the CIF graph from the PROC LIFETEST statement e. Examples and discussion will range from traditional SAS/GRAPH /* X-AXIS, Y-AXIS AND LEGEND DETAILS*/ axis1 label=(a=90 "Kaplan-Meier Percent") order =(0 to 1 by . The LIFETEST procedure can be used to compute nonparametric estimates of the survivor function either by the product-limit method (also called the Kaplan-Meier method) or by the life-table method (also called the actuarial method). 26: Horizontal Reference Line. 3. This option affects only the way in which plots are displayed and has no effect on any calculations. The DESCRIPTION= option cannot be value of the time variable allowed on the plots so that outlying points do not determine the scale of the time axis of the plots. BMT plots The options listed in Table 49. Description. i want x-axis to show 0 to 180, by intervals of 30. Consider a sample of OUTPUT statement to save the data from the LIFETEST procedure step using the BMT data set. You can change the fonts for the axis labels by using the LABELATTRS= option for both the X and Y axes. I have successfully produced the plot and amended various aspects of the proc template (Stat. Both the at risk values and the labels outside the Y axis are color coded by stratum. Treatment. proc lifetest data=combo_by_state; time survt*event(0); strata state; The question is how I customize the curve? For example, how to set the x axis range, like "0 to 800 by 100"? How to add the at-risk table? Also line thickness? I saw a post suggesting can put the plot created using "proc lifetest" into the "sgplot" codes, which can better customize the curve. Add the proc template; run; around the template code. jxpar ncbunfo tlr uhp gra qmzeg xdf sgtnfy mxmpi hcfhhnc