prepare.n1: ESTIMATES THE LOG-RANK DISTRIBUTION AND STORE IT WITHIN A...

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

Description

This method estimates the log-rank distribution for a minor size group equal to n1.

Usage

1
prepare.n1(vro, n1)

Arguments

vro

the valorate object.

n1

a numerical value (perhaps integer) of the size of the survival group.

Details

This method actually estimates the log-rank distribution for a minor size group equal to n1. This method is internally called by all functions to first check and/or compute the log-rank distribution of n1. It is not intended to be used by final users unless it is intended to prepare the VALORATE object before p-value calculations (perhaps in separated threds or jobs and saving/restoring the object).

Value

The updated valorate object. This is a S4 method operating an object, so the valorate object specified in argument will be updated with the estimations of the distribution of the log-rank for n1 subjects.

Author(s)

Victor Trevino vtrevino@itesm.mx

References

Trevino et al. 2016 http://bioinformatica.mty.itesm.mx/valorateR

See Also

new.valorate. valorate.survdiff.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Create a random population of 100 subjects 
## having 20 events
subjects <- numeric(100)
subjects[sample(100,20)] <- 1
vo <- new.valorate(rank=subjects, sampling.size=100000)
# and with verbose
vo <- new.valorate(rank=subjects, sampling.size=100000, verbose=TRUE)

## print the initial subpop
ls(vo@subpop) # should be character(0)

## calculate
prepare.n1(vo, 10) # should show messages of partial calculations P(L|k)

## print the current subpop
ls(vo@subpop) #should show now: [1] "subpop10"

names(vo@subpop[["subpop10"]]) #should show the internal names of the estimated subpop

valorate documentation built on May 1, 2019, 9:10 p.m.