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.50550773 -2.55233435 -1.62405124 0.35780922 -0.71965501 0.42837376
#> [7] -0.08029425 -0.58437214 -0.88479483 -0.32646873 1.12395254 -0.80328044
#> [13] 1.06255817 -1.07022490 -0.77342373 -2.52242958 -0.08640770 -0.09028514
#> [19] 0.27102000 -0.12763081 -1.84685404 0.16925267 -0.22788287 -0.23416974
#> [25] -0.37145776 -0.90900729 -0.69782063 -2.21460813 -1.77632471 -0.28655472
#> [31] 0.56853490 0.68305028 -0.90359113 -0.67028281 1.16833165 -1.72144509
#> [37] -0.24678460 -0.84819388 -0.40834143 -1.05269868 -0.61575612 -0.34734612
#> [43] -1.39806749 -0.75272103 -0.82192865 -0.70109279 0.16498642 -2.41225549
#> [49] 1.52832686 -0.51352820 -0.29846433 -3.08949461 -1.34449695 -1.20832138
#> [55] -1.01918009 0.31581703 -0.93025604 -0.99585170 -0.47280368 -1.76770430
#> [61] 0.77371410 -2.19797147 0.38874883 -1.56536338 0.15174317 0.03434288
#> [67] -0.90893331 -0.75234691 -0.76644088 -1.64058341 0.26392064 -1.44312871
#> [73] 0.63325730 -0.46814029 -0.53934425 -1.75198155 -1.84401974 -1.09249881
#> [79] -0.80416992 -0.36417688 0.91957942 -0.95050079 -1.48272076 -0.89856651
#> [85] -1.65551331 0.18251343 0.21480312 -2.20581665 -1.38941597 0.60676792
#> [91] -1.64479794 -1.22598557 -0.88188276 -0.52800028 0.50303557 -1.27020074
#> [97] -0.29156016 -3.22252144 -2.21374260 -0.44401091
#>
#> $alpha1
#> [1] 1.35392326 3.57007773 2.00166917 -0.27989689 1.46173968 -0.02520215
#> [7] -0.47914355 2.31133587 0.71806771 0.94885673 0.88481739 0.40003345
#> [13] -0.13586279 0.95553481 1.92250290 2.06473039 -0.16739264 1.95839353
#> [19] -0.03466121 1.93838678 2.90910308 0.30451249 0.78789480 1.34938286
#> [25] 1.84485504 1.97901784 1.69092119 0.82372308 1.97871807 1.23489737
#> [31] 2.11335459 2.14052299 1.66916985 0.73127349 -0.59483911 1.88080188
#> [37] 0.63126434 0.20001458 1.46286022 0.00823751 0.65059328 0.76880537
#> [43] 1.04392131 1.45747260 3.03984767 0.49615867 1.13007542 1.30525039
#> [49] 0.57222840 1.26025039 -0.08752278 2.32178278 0.65647257 2.08143620
#> [55] 0.07747305 -1.21434781 1.16135312 1.42945982 1.49168929 1.60108182
#> [61] -0.75602006 1.43485755 0.54068667 0.55333639 0.96676839 0.66455201
#> [67] 1.69191646 3.52197760 2.31230423 0.83163427 0.25762222 3.91043577
#> [73] 1.09832107 1.57423620 0.41283559 1.85250918 1.71835268 1.06294806
#> [79] 1.29546397 0.54876826 1.42400757 0.35076745 0.34576507 1.20163670
#> [85] 0.75506254 0.38849803 1.85147485 2.23275006 -0.18297486 0.87974582
#> [91] 1.66780454 1.91597971 1.16490812 -0.06291770 0.17579833 0.29063930
#> [97] -0.01257664 0.21809149 1.75031831 2.53735671
#>
#>
#> 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
#>
#>