LogisticNormal
is the class for the usual logistic regression model with
a bivariate normal prior on the intercept and slope.
Details
The covariate is the natural logarithm of the dose \(x\) divided by the reference dose \(x*\), i.e.: $$logit[p(x)] = alpha0 + alpha1 * log(x/x*),$$ where \(p(x)\) is the probability of observing a DLT for a given dose \(x\). The prior $$(alpha0, alpha1) ~ Normal(mean, cov).$$
Examples
# Define the dose-grid.
empty_data <- Data(doseGrid = c(1, 3, 5, 10, 15, 20, 25, 40, 50, 80, 100))
my_model <- LogisticNormal(
mean = c(-0.85, 1),
cov = matrix(c(1, -0.5, -0.5, 1), nrow = 2)
)
my_options <- McmcOptions(burnin = 10, step = 2, samples = 100)
samples <- mcmc(empty_data, my_model, my_options)
samples
#> An object of class "Samples"
#> Slot "data":
#> $alpha0
#> [1] -0.724261515 -2.068807238 -0.116184894 -0.463547542 -1.408496701
#> [6] -3.226525679 -0.240526328 -1.801558739 -1.981044994 -0.709098794
#> [11] -0.561993262 -1.850363628 -1.023864413 -0.509148864 -0.828319450
#> [16] -0.951446437 -1.009433791 -0.297329783 -2.286939190 -0.002537672
#> [21] -0.650961936 -0.740379802 0.182255049 -0.564341160 -0.271065329
#> [26] -0.670303968 0.325679721 -2.108703425 -0.035031792 -0.056225702
#> [31] -0.830162358 -2.295499736 -0.357691676 -1.473961852 -0.079489129
#> [36] -1.244716526 -0.888136009 -1.970326735 -0.730823187 -0.477871290
#> [41] 0.513582912 -0.689418855 -0.073740295 -0.939938230 -1.291268286
#> [46] -2.127622164 -1.626638880 0.600476918 -0.245769178 -1.499616905
#> [51] -1.994920172 0.404564604 -0.387984434 -2.398667470 -0.448523575
#> [56] -0.374451409 -0.005265208 -0.037812628 -0.211691277 -0.047621673
#> [61] -1.396992055 -0.093742497 -2.558137689 0.054362342 -1.365084756
#> [66] -2.549806756 -1.483248592 -0.773814167 -0.983948049 0.446165580
#> [71] -0.820119446 -0.236995109 -0.848461968 -0.798150903 -1.266452416
#> [76] -1.388736419 -0.667263143 -1.979985251 -0.581460813 -0.020356233
#> [81] -2.575241509 -0.838493160 -2.224529407 -0.378933224 0.472532462
#> [86] 0.283951675 -1.371180955 1.211707552 -1.392739236 0.146329651
#> [91] -1.153419056 -1.720736583 -0.233609573 -1.153144511 0.681647997
#> [96] 1.248542352 -2.029108292 -1.473729784 -1.950952773 -2.829265417
#>
#> $alpha1
#> [1] 2.3067547498 1.6330953917 1.0922057378 1.9816621519 2.1436840811
#> [6] 3.3173513150 0.8671235517 -0.5982061373 2.4017019230 1.6700612559
#> [11] 1.5920609763 1.1777661551 2.2531522608 0.8799735180 2.3733653657
#> [16] 3.3330821399 0.7140066102 1.5743262055 2.2606677432 0.0846862773
#> [21] 0.8201796382 2.4716165434 0.1335636729 0.8185274728 0.7352455981
#> [26] 1.1411702062 0.4181017749 3.3914280269 0.6461590810 0.8377603669
#> [31] 2.0428645932 1.9479446550 0.5084461609 0.9702748503 0.7159659322
#> [36] 2.1272428371 1.0484543107 2.2017528009 0.3265638846 1.1216967137
#> [41] 1.0762155024 -0.1572173858 0.1418561854 -0.0218230584 0.4434704909
#> [46] 1.1379093469 0.2939405412 0.1608609151 1.9283091175 1.3735615938
#> [51] 1.1969074787 -1.1307978813 -1.1750129020 1.9117079404 0.5495993959
#> [56] 0.7283040678 0.4829393041 0.6016480955 0.1530204146 -0.0008545159
#> [61] 0.5573304990 0.7471612802 1.0640264167 -0.5199115996 0.1922805266
#> [66] 2.8358289020 1.5383630634 -0.5044412072 0.6576748518 -0.1569110757
#> [71] -0.2980389418 1.0310991813 1.1273156919 2.4583076976 2.2747603284
#> [76] 1.0535267830 2.1440425165 2.6644960796 2.3863246067 -0.1122383724
#> [81] 3.2990868286 0.5058768381 2.1429613225 -0.5160181543 0.4630778766
#> [86] -0.8965726890 1.1173819506 0.3207835379 0.8634751578 1.5783173670
#> [91] 1.4722922960 2.3711792304 1.6434117293 1.7422731423 0.7646038356
#> [96] -0.0370878836 1.5511771073 1.1286212287 2.4018855342 0.8040435093
#>
#>
#> Slot "options":
#> An object of class "McmcOptions"
#> Slot "iterations":
#> [1] 210
#>
#> Slot "burnin":
#> [1] 10
#>
#> Slot "step":
#> [1] 2
#>
#> Slot "rng_kind":
#> [1] NA
#>
#> Slot "rng_seed":
#> [1] NA
#>
#>