event_diff: Considering the enrollment rate, failure rate, and...

View source: R/expected_time.R

event_diffR Documentation

Considering the enrollment rate, failure rate, and randomization ratio, calculate the difference between the targeted number of events and the accumulated events at time x

Description

A helper function passed to uniroot()

Usage

event_diff(x, enroll_rate, fail_rate, ratio, target_event)

Arguments

x

Duration

enroll_rate

An enroll_rate data frame with or without stratum created by define_enroll_rate().

fail_rate

A fail_rate data frame with or without stratum created by define_fail_rate().

ratio

Experimental:Control randomization ratio.

target_event

The targeted number of events to be achieved.

Value

A single numeric value that represents the difference between the expected number of events for the provided duration (x) and the targeted number of events (target_event)


gsDesign2 documentation built on April 3, 2025, 9:39 p.m.