generate_2State: Generate data following a 2 states model

View source: R/generateData.R

generate_2StateR Documentation

Generate data following a 2 states model

Description

Generate individuals such that each individual starts at time 0 with state 0 and then an unique change to state 1 occurs at a time t generated using an uniform law between 0 and 1.

Usage

generate_2State(n)

Arguments

n

number of individuals

Value

a data.frame with 3 columns: id, id of the trajectory, time, time at which a change occurs and state, new state.

Author(s)

Cristian Preda, Quentin Grimonprez


modal-inria/cfda documentation built on Oct. 19, 2023, 10:03 a.m.