Learn R Programming

mets (version 1.3.11)

force.same.cens: Force Same Censoring Within Clusters

Description

Enforces the same censoring time within clusters (pairs) by censoring both subjects at the minimum censoring time when censoring occurs first.

Usage

force.same.cens(
  data,
  id = "id",
  time = "time",
  cause = "cause",
  entrytime = NULL,
  cens.code = 0
)

force_same_cens( data, id = "id", time = "time", cause = "cause", entrytime = NULL, cens.code = 0 )

Value

A data.frame with enforced same censoring.

Arguments

data

a data.frame in long format.

id

name of the cluster/pair identifier column.

time

name of the time variable.

cause

name of the cause/status variable.

entrytime

optional name of left-truncation time variable.

cens.code

value indicating censoring in the cause variable.