Learn R Programming

WPC (version 1.0)

ww.windows: Create a Series of Overlapping Windows by Fixing Biomarker Scale Window Width

Description

This function creates a series of overlapping windows by fixing the biomarker scale window width

Usage

ww.windows(event, censor, marker, wdth, sspeed)

Arguments

event
This is the survival time. It is a positive numerical vector with no missing values.
censor
This specifies censor information. It is a vector, with 1 indicating an event and 0 indicating right censored. No missing values are allowed.
marker
This is the biomarker information (or other interesting variables). It is numerical with no missing values.
wdth
This is to specify window width of each overlapping window. The window width is defined based on the biomarker scale. The smaller the window width is, the more the overlapping windows are specified.
sspeed
This is to specify the window sliding step. Since the window is gradually moving from small values on the left to the large values on the right. This variable specifies the window sliding step being removed from the left and added on the right, in order to keep the same window width for each window.

Value

A list with components: A list with components:

Details

It begins by ordering all the subjects based on their biomarker values from low to high. Let $x_1, x_2, \dots, x_n$ be the ordered unique values of X observed in the data. Then a series of overlapping windows can be defined using two parameters: $\gamma$ - the biomarker-scale window width and $\nu$ - the window sliding step. Because the window is gradually moving from small values on the left to large values on the right, in order to keep the same window width for each window. The first window starts from the first subject with the smallest biomarker value $x_1$, including subjects whose biomarker values are in the biomarker-scale window of $[x_1, x_1+\gamma]$. The second window will move forward by $\nu$ biomarker-scale width, and include subjects whose biomarker values dropped in the second window $[x_1+\nu, x_1+\nu+\gamma]$. This process continues until all subjects have been included in at least one window. Subjects can be included in several windows.

References

Yang H., Tang R., Hale M. and Huang J. (2016) A visualization method measuring the performance of biomarkers for guiding treatment decisions Pharmaceutical Statistics, 15(2), 1539-1612

See Also

ns.windows

Examples

Run this code
	
	## Window width is specified as 10 and window sliding step is 1:

	
	object = ww.windows(event=wpcdata$OSday, censor=wpcdata$OScensor, 
	marker=wpcdata$Biomarker1, wdth=10, sspeed=1)

	print(object)

Run the code above in your browser using DataLab