R bloggers

PK/PD reserving models

FavoriteLoadingAdd to favorites

My updated model is not much different to the one presented in the earlier post, apart from the fact that I allow for the correlation between (RLR) and (RRF) and the mean function (tilde{f}) is the integral of the ODEs above.[begin{aligned}y(t) & sim mathcal{N}(tilde{f}(t, Pi, beta_{er}, k_p, RLR_{[i]}, RRF_{[i]}), sigma_{y[delta]}^2) \begin{pmatrix} RLR_{[i]} RRF_{[i]}end{pmatrix} & simmathcal{N} left(begin{pmatrix}mu_{RLR} \mu_{RRF}end{pmatrix},begin{pmatrix}sigma_{RLR}^2 & rho sigma_{RLR} sigma_{RRF}\rho sigma_{RLR} sigma_{RRF} & sigma_{RRF}^2end{pmatrix}right)end{aligned}] Implementation with brms Let’s load the data back into R’s memory: library(data.table) lossData0 <- fread(“https://raw.githubusercontent.com/mages/diesunddas/master/Data/WorkersComp337.csv”) Jake shows in the appendices of his paper how to implement this model in R with the nlmeODE (Tornoe (2012)) package, together with more flexible models in OpenBUGS (Lunn et al. (2000)). However, I will continue with brms and Stan. Using the ODEs with brms requires a little extra coding, as I have to provide the integration…
Original Post: PK/PD reserving models