Learn R Programming

ahw (version 0.1.0)

addNoiseAtEventTimes: Tie removal

Description

Removes ties from by adding noise at tied times

Usage

addNoiseAtEventTimes(fr, id, from, to)

Value

Longitudinally refined data.table of the input data.table

fr with random noise added for tiebreaking.

Arguments

fr

Data on long format

id

Name of column in dataFr that identifies individuals

from

Name of the variable that contains the name of start state for each at-risk interval

to

Name of column with stop time of the at risk period

Author

Pål Christie Ryalen <p.c.ryalen@medisin.uio.no>

Examples

Run this code
library(data.table)
data(fr1)
fr1 <- as.data.table(fr1)
fr1 <- addNoiseAtEventTimes(fr1)
head(fr1)

Run the code above in your browser using DataLab