Perform normalization of the covariate

performNorm(
  data,
  covariate,
  varName,
  normOp,
  normValVec,
  isLog = FALSE,
  isCat = FALSE,
  isHS = FALSE
)

Arguments

data

a dataframe consisting the covariates added

covariate

a string giving the covariate name; must be present in the data used for 'fit'

varName

the variable name to which the covariate is being added

normOp

an operator indicating the kind transformation to be done on the covariate

normValVec

a numeric value to be used for normalization of the covariate

isLog

a boolean indicating the presence of log-transformation in the funstring; default is FALSE

isCat

a boolean indicating if the covariate is categorical; default is FALSE

isHS

a boolean indicating if the covariate is of Hockey-stick kind; default is FALSE

Value

a list comprising the update dataframe, the expression for covariate, and a list of covariate names

Author

Vipul Mann, Matthew Fidler