Learn R Programming

NADA (version 1.6-1.1)

flip-methods: Methods for function flip in Package NADA

Description

Methods for function flip in package NADA.

When used in concert with Cen, flip rescales left-censored data into right-censored data for use in the survival package routines (which can only handle right-censored data sets).

Usage

# S4 method for Cen
flip(x)

# S4 method for formula flip(x)

Arguments

x

A Cen or formula object.

Notes

Flips, or rescales a Cen object or a formula object.

By default, flip rescales the input data by subtracting a large constant that is larger than maximum input value from all observations. It then marks the data as right censored so that routines from the survival package can be used.

IMPORTANT: All NADA routines transparently handle flipping and re-transforming data. Thus, flip should almost never be used, except perhaps in the development of an extension function.

Also, flipping a Cen object results in a Surv object -- which presently cannot be flipped back to a Cen object!

Flipping a formula just symbolically updates the response (which should be a Cen object). Result is like: flip(Cen(obs, cen))~groups