p_0 = NULL
L = NULL
d <- c(12.59972,34.65492,44.69007,60.80685,83.68946,100.37111)
theta <- 0.2
options <- list(nchains = 2,
niter = 4000,
nadapt = 0.8)
AUCs <- c(0.43, 1.4, 5.98, 7.98, 11.90, 3.45)
x <- c(1,2,3,4,5,6)
y <- c(FALSE,FALSE,FALSE,FALSE,TRUE,FALSE)
D_AUC <- c(0, 1.3, -0.34, -2.7,0.39, -2.45)
### Betapriors ###
param_pk <- c(2,10,100)
omega2 <- 0.7
logit <- function(x) log(x/(1-x)) # logit function
xr <- d
yr <- logit(pnorm((log(xr) - log(10.96) - log(param_pk[2]))/omega2))
coeff <- lm(yr ~ log(xr))
beta0mean <- -coeff$coefficients[1]
beta1mean <- coeff$coefficients[2]
betapriors <- c(beta0mean, beta1mean)
pkcov(y, AUCs, d, x, theta, p_0, L, betapriors,D_AUC,options)
Run the code above in your browser using DataLab