The importance of evaluating complications and toxicity during and following treatment has been stressed in many publications. In most studies, these endpoints are presented descriptively and summarized by numbers and percentages but descriptive methods are rarely sufficient to evaluate treatment-related complications. Pepe and Lancar developed Prevalence and Weighted Prevalence functions which take into account the duration and the severity of complication unlike conventional methods of survival analysis or competing risks which are limited to the time to first event. The purpose of this paper is to describe features and use of two R functions, main.preval.func and main.wpreval.func, which were designed for the analysis of survival adjusted for quality of life. These functions compute descriptive statistics, survival and competing risks analysis and especially Prevalence and Weighted Prevalence estimations with confidence intervals and associated test statistics. The use of these functions is illustrated by several examples. 
Assessment of health status over time by Prevalence and Weighted Prevalence functions: Interface in R