USEPA / CompTox-ToxCast-tcplFit2

Performs basic concentration response curve fitting
https://cran.r-project.org/package=tcplfit2
Other
1 stars 0 forks source link

Negative direction fits have higher hitc than positive direction fits #88

Open brown-jason opened 1 month ago

brown-jason commented 1 month ago

devtools::load_all() conc <- c( 100, 200, 1, 50, 10, 4, 100, 20, 50, 0.002, 80, 100, 4, 80, 1, 200, 0.002, 20, 200, 0.1, 80, 1, 0.002, 0.1, 10, 0.1, 10, 4, 50, 20 )

resp <- c( -0.116048432003323, -0.197744804254513, 0.507533002751997, -0.246648570561157, 0.0242509485685297, 0.273500665859675, 0.704079016034297, -0.11682615521551, 0.696719415469671, 0.227635159284553, 0.851487403969359, 0.290264456024963, 0.00857682986362511, -0.119785075477233, 0.0403764484473341, 0.35207291570481, -0.0154619923510798, 0.445940843715409, 0.926833169198452, 0.17310450152905, 0.250514770526422, -0.183992520958328, -0.464310387538052, 0.371328619153686, 0.479615397176782, -0.229423985545584, 0.169859047697638, 0.0608059670016273, 0.334411980331733, 0.10696203680843 )

coff <- 0.365988923837698 osd <- 0.249598005760253

positive_fit <- tcplfit2_core(conc = conc, resp = resp, cutoff = coff, force.fit = TRUE) negative_fit <- tcplfit2_core(conc = conc, resp = -1 resp, cutoff = coff, force.fit = TRUE) positive_hit <- tcplhit2_core(params = positive_fit, conc = conc, resp = resp, cutoff = coff, onesd = osd, bmd_low_bnd = .1, bmd_up_bnd = 10) negative_hit <- tcplhit2_core(params = negative_fit, conc = conc, resp = -1 resp, cutoff =coff, onesd = osd, bmd_low_bnd = .1, bmd_up_bnd = 10)

positive_hit$hitcall negative_hit$hitcall