ValidateDf: Validate data frame for variability in exposure and outcome

Description Usage Arguments Value Author(s)

View source: R/00.Miscellaneous.R

Description

Validate a given data frame for variability in the exposure variable and outcome variable. The exposure variable specified in expo_var should have two values to make regression meaningful. Only one of out_var and event_var is required although both can be validated at the same time. Because the error raised can stop the simulation, it should be used within try function.

Usage

1
ValidateDf(df, expo_var, bin_var = NULL, event_var = NULL)

Arguments

df

data frame to be used in a regression analysis

expo_var

string for the exposure variable name

bin_var

string for the binary outcome variable name

event_var

string for the survival event indicator variable name (1 for event)

Value

the validated data frame if it is valid. Otherwise, an error is raised to stop estimation on invalid data.

Author(s)

Kazuki Yoshida


kaz-yos/distributed documentation built on May 27, 2019, 4:50 a.m.