ns.windows: Create a Series of Overlapping Windows by Fixing Number of...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/ns.windows.R

Description

This function creates a series of overlapping windows by fixing the number of patients within each window.

Usage

1
ns.windows(event, censor, marker, nsub, 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.

nsub

This is to specify the fixed number of patients within each window. The smaller the number of patients within each window, 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 form the left and added on the right, in order to keep the same number of subjects in each window.

Details

It begins by ordering all the subjects based on their biomarker values from low to high. Let x_1, x_2, …, 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: γ - the number of patients within each window and ν - the number of patients being rotated out for each moving step. The window is gradually moving from small values on the left to large values on the right, in order to keep the same number of patient in each window. The first window starts from the first subject to the (γ+1)th subject. The second window will move forward by νth subjects and including from (γ+ν+1)th subject till (γ+2\timesν)th subject. This process continues until all subjects have been included in at least one window. Subjects can be included in several windows.

Value

A list with components:

xwin

A series of marker values which will be assigned to the estimated survival rates within each window.

ntotal

The total number of overlapping windows defined.

wdata

A list of overlapping windows and each list representing a window with data frame of event, censor and marker

nsam

A vector, with each number representing the number of patients within each overlapping window.

winsize

A vector, with each number representing the half width for each overlapping window. Each window width is two times of it.

Author(s)

Hui Yang huiy@amgen.com, Rui Tang rui_tang@vrtx.com and Jing Huang jinghuang0@gmail.com

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

ww.windows

Examples

1
2
3
4
5
	## Window width is specified as 10 and window sliding step is 1:

	object = ns.windows(event=wpcdata$OSday, censor=wpcdata$OScensor, 
	marker=wpcdata$Biomarker1, nsub=10, sspeed=1)
	print(object)

WPC documentation built on May 2, 2019, 6:52 a.m.