Learn R Programming

adoptr (version 1.1.1)

Survival-class: Log-rank test

Description

Implements the normal approximation of the log-rank test statistic.

Usage

Survival(event_rate, two_armed = TRUE)

# S4 method for Survival quantile(x, probs, n, theta, ...)

# S4 method for Survival,numeric simulate(object, nsim, n, theta, seed = NULL, ...)

Arguments

event_rate

probability that a subject will eventually have an event

two_armed

logical indicating if a two-armed trial is regarded

x

outcome

probs

vector of probabilities

n

sample size

theta

distribution parameter

...

further optional arguments

object

object of class Survival

nsim

number of simulation runs

seed

random seed

Slots

event_rate

cf. parameter 'event_rate'

See Also

see probability_density_function and cumulative_distribution_function to evaluate the pdf and the cdf, respectively.

Examples

Run this code
datadist <- Survival(event_rate=0.6, two_armed=TRUE)

Run the code above in your browser using DataLab