Skip to contents

Modify an existing model by updating its coefficients

Usage

modifyExistingModel(modelDir, outcomeId, exposureIds, newBetas)

Arguments

modelDir

The directory where all the outcome models are stored.

outcomeId

The outcome id of the predicted by the model being modified

exposureIds

The exposure ids for which the model will be modified. If set to -1, all exposures will be affected the same. Consequently, no effect modification will be present.

newBetas

A list of data frames with columns column_label and estimate. Column column_label contains the covariate id for which the coefficient will be replaced by column estimate. Should be the same length as exposureIds, unless exposureIds is -1.