Load the data set with the function data()
, define the
duration of the exposure time_accumulation
, and check if
the data set is correctly imported with the function
modelData()
. Here the data set is called Male Gammarus
Single
The function fitTK()
performs the inference process.
The 4 MCMC are stored in the object fitMCMC
. The
quantiles for each TK parameter can be obtained with the
quantile()
function.
data("Male_Gammarus_Merged")
data_MGM708 <- Male_Gammarus_Merged[Male_Gammarus_Merged$expw == 7.08021e-05, ]
modelData_MGM708 <- modelData(data_MGM708, time_accumulation = 4)
fit_MGM708 <- fitTK(modelData_MGM708, iter = 10000)
data_MGM141 <- Male_Gammarus_Merged[Male_Gammarus_Merged$expw == 1.41604e-04, ]
modelData_MGM141 <- modelData(data_MGM141, time_accumulation = 7)
fit_MGM141 <- fitTK(modelData_MGM141, iter = 20000)
data("Oncorhynchus_two") # Pimephales_two
data_OT440 = Oncorhynchus_two[Oncorhynchus_two$expw == 0.00440,]
modelData_OT440 <- modelData(data_OT440, time_accumulation = 49)
fit_OT440 <- fitTK(modelData_OT440, iter = 10000)
data("Male_Gammarus_Single")
modelData_MGS <- modelData(Male_Gammarus_Single, time_accumulation = 4)
fit_MGS <- fitTK(modelData_MGS, iter = 5000, chains = 3)
# Data 4 prediction should respect the exposure routes
data_4pred <- data.frame( time = 1:25, expw = 4e-5 )
predict_MGS <- predict(fit_MGS, data_4pred)
plot(predict_MGS)
# data("Male_Gammarus_seanine_growth")
# modelData_MGSG <- modelData(Male_Gammarus_seanine_growth, time_accumulation = 4)
# fit_MGSG <- fitTK(modelData_MGSG, iter = 5000, chains = 3)
#
# # Data 4 prediction should respect the exposure routes
# data_4pred <- data.frame( time = 1:25, expw = 18 )
# predict_MGSG <- predict(fit_MGSG, data_4pred)
# plot(predict_MGSG)
data("Chiro_Creuzot")
Chiro_Creuzot <- Chiro_Creuzot[Chiro_Creuzot$replicate == 1,]
modelData_CC <- modelData(Chiro_Creuzot, time_accumulation = 1.0)
fit_CC <- fitTK(modelData_CC, iter = 5000, chains = 3)
# --------
quantile_table(fit_CC)
# Data 4 prediction should respect the exposure routes
data_4pred <- data.frame( time = 1:25, expw = 18, exps = 1200, exppw = 15 )
predict_CC <- predict(fit_CC, data_4pred)
plot(predict_CC)