simulate_ice {rbmi}R Documentation

Simulate intercurrent event

Description

Simulate intercurrent event

Usage

simulate_ice(outcome, visits, ids, prob_ice, or_outcome_ice, baseline_mean)

Arguments

outcome

Numeric variable that specifies the longitudinal outcome for a single group.

visits

Factor variable that specifies the visit of each assessment.

ids

Factor variable that specifies the id of each subject.

prob_ice

Numeric vector that specifies for each visit the probability of experiencing the ICE after the current visit for a subject with outcome equal to the mean at baseline. If a single numeric is provided, then the same probability is applied to each visit.

or_outcome_ice

Numeric value that specifies the odds ratio of the ICE corresponding to a +1 higher value of the outcome at the visit.

baseline_mean

Mean outcome value at baseline.

Details

The probability of the ICE after each visit is modeled according to the following logistic regression model: ~ 1 + I(visit == 0) + ... + I(visit == n_visits-1) + I((x-alpha)) where:

Value

A binary variable that takes value 1 if the corresponding outcome is affected by the ICE and 0 otherwise.


[Package rbmi version 1.2.6 Index]