Convenient function to turn an efftox_fit
into a data.frame
.
efftox_analysis_to_df(x)
x | An instance of |
---|
a data.frame
#> #> SAMPLING FOR MODEL 'EffTox' NOW (CHAIN 1). #> Chain 1: #> Chain 1: Gradient evaluation took 6.5e-05 seconds #> Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.65 seconds. #> Chain 1: Adjust your expectations accordingly! #> Chain 1: #> Chain 1: #> Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 1: #> Chain 1: Elapsed Time: 0.092295 seconds (Warm-up) #> Chain 1: 0.063689 seconds (Sampling) #> Chain 1: 0.155984 seconds (Total) #> Chain 1: #> #> SAMPLING FOR MODEL 'EffTox' NOW (CHAIN 2). #> Chain 2: #> Chain 2: Gradient evaluation took 1.4e-05 seconds #> Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.14 seconds. #> Chain 2: Adjust your expectations accordingly! #> Chain 2: #> Chain 2: #> Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 2: #> Chain 2: Elapsed Time: 0.095475 seconds (Warm-up) #> Chain 2: 0.064923 seconds (Sampling) #> Chain 2: 0.160398 seconds (Total) #> Chain 2: #> #> SAMPLING FOR MODEL 'EffTox' NOW (CHAIN 3). #> Chain 3: #> Chain 3: Gradient evaluation took 1e-05 seconds #> Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 0.1 seconds. #> Chain 3: Adjust your expectations accordingly! #> Chain 3: #> Chain 3: #> Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 3: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 3: #> Chain 3: Elapsed Time: 0.095016 seconds (Warm-up) #> Chain 3: 0.069061 seconds (Sampling) #> Chain 3: 0.164077 seconds (Total) #> Chain 3: #> #> SAMPLING FOR MODEL 'EffTox' NOW (CHAIN 4). #> Chain 4: #> Chain 4: Gradient evaluation took 1.8e-05 seconds #> Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 0.18 seconds. #> Chain 4: Adjust your expectations accordingly! #> Chain 4: #> Chain 4: #> Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup) #> Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup) #> Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup) #> Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup) #> Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup) #> Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup) #> Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling) #> Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling) #> Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling) #> Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling) #> Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling) #> Chain 4: Iteration: 2000 / 2000 [100%] (Sampling) #> Chain 4: #> Chain 4: Elapsed Time: 0.092651 seconds (Warm-up) #> Chain 4: 0.079107 seconds (Sampling) #> Chain 4: 0.171758 seconds (Total) #> Chain 4:df <- efftox_analysis_to_df(fit) df#> Dose N ProbEff ProbTox ProbAccEff ProbAccTox Utility Acceptable #> 1 1 1 0.2237788 0.04672811 0.15675 0.95300 -0.63133934 TRUE #> 2 2 1 0.5961475 0.09174578 0.65300 0.90825 0.04176272 TRUE #> 3 3 1 0.8974676 0.35198406 0.97025 0.51400 0.24314939 TRUE #> 4 4 0 0.9551122 0.62486381 0.98775 0.24300 -0.05835585 TRUE #> 5 5 0 0.9706994 0.74206976 0.98825 0.17100 -0.20581314 FALSE #> ProbOBD #> 1 0.03250 #> 2 0.31425 #> 3 0.44750 #> 4 0.07450 #> 5 0.13125