uniformize.data: Standardize data format

View source: R/preconditionChecks.R

uniformize.dataR Documentation

Standardize data format

Description

Checks the required preconditions of the data and possibly restructures the data.

Usage

uniformize.data(
  data,
  admin = FALSE,
  conf = FALSE,
  comp.risks = FALSE,
  Zbin = NULL,
  Wbin = NULL
)

Arguments

data

A data frame that should contain columns named Y and delta (unless comp.risks = TRUE, see later).

admin

Boolean value indicating whether the provided data frame contains administrative (i.e. independent) censoring on top of the dependent censoring (in the column named delta). The default is admin = FALSE.

conf

Boolean value indicating whether the provided data frame contains a confounded variable and a corresponding instrument. If cond = TRUE, the provided data frame should contain columns named Z and W, corresponding to the confounded variable and instrument, respectively. Moreover, Zbin and Wbin should be specified. The default value is conf = FALSE.

comp.risks

Boolean value indicating whether the provided data frame contains competing risks. If comp.risks = TRUE, the given data frame should contain the columns delta1, delta2, etc., corresponding to the indicators I(Y = T1), I(Y = T2), etc. respectively. The default is comp.risks = FALSE.

Zbin

Boolean or integer value (0, 1) indicating whether the confounded variable is binary. Zbin = TRUE or Zbin = 1 means that Z is binary. Zbin = FALSE or Zbin = 0 means that Z is continuous.

Wbin

Boolean or integer value (0, 1) indicating whether the instrument is binary. Wbin = TRUE or Wbin = 1 means that W is binary. Wbin = FALSE or Wbin = 0 means that W is continuous.

Value

Returns the uniformized data set.


depCensoring documentation built on April 4, 2025, 1:52 a.m.