79167455

Date: 2024-11-07 17:17:25
Score: 0.5
Natty:
Report link

Perhaps you could set up control logic that determines with measure is used?

bmiCovariate <- "bmi"

if(bmiCovariate == "bmi"){
  
  tv <- tmerge(data1=tv, data2=visitWise, id=personId, 
               bmiMeasure=tdc(visitDay, bmi))
  
} else {   
  
  tv <- tmerge(data1=tv, data2=visitWise, id=personId, 
               bmiMeasure=tdc(visitDay, modifiedBmi))
  
}

Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
  • High reputation (-1):
Posted by: xilliam