pick_val_v(base = list(0,0),
psa =list(rnorm(1,0,0.1),rnorm(1,0,0.1)),
sens = list(2,3),
psa_ind = FALSE,
sens_ind = TRUE,
indicator=list(1,2),
indicator_sens_binary = FALSE,
sens_iterator = 2,
distributions = list("rnorm","rnorm")
)
pick_val_v(base = list(2,3,c(1,2)),
psa =sapply(1:3,
function(x) eval(call(
c("rnorm","rnorm","mvrnorm")[[x]],
1,
c(2,3,list(c(1,2)))[[x]],
c(0.1,0.1,list(matrix(c(1,0.1,0.1,1),2,2)))[[x]]
))),
sens = list(4,5,c(1.3,2.3)),
psa_ind = FALSE,
sens_ind = TRUE,
indicator=list(1,2,c(3,4)),
names_out=c("util","util2","correlated_vector") ,
indicator_sens_binary = FALSE,
sens_iterator = 4,
distributions = list("rnorm","rnorm","mvrnorm"),
covariances = list(0.1,0.1,matrix(c(1,0.1,0.1,1),2,2))
)
Run the code above in your browser using DataLab