here is the events dataframe
events <- data.frame(
TRTA = c('Xanomeline','Xanomeline', 'Xanomeline', 'Xanomeline', 'Xanomeline', 'Placebo'),
ASTDY = c(4, 4, 13, 34, 70, 162),
AEDECOD = c('ABDOMINAL PAIN','ABDOMINAL PAIN', 'ABDOMINAL PAIN', 'ABDOMINAL PAIN', 'ABDOMINAL PAIN', 'ABDOMINAL PAIN'),
x = c(0, -1.10254, -4.7631, -15.8914, -39.0318, -87.7844),
y = c(0, 3.8450, 12.0669, 29.8759, 57.4535, 135.4739),
freq= rep(6,6)
)
I am not sure how to begin with, any thoughts are appreciated.
please help me derive the x and y based on the algorithm from the following article , we need to use TRTA, ASTDY and AEDECOD and freq