Last updated: 2024-02-26
Checks: 7 0
Knit directory: survival-susie/
This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20230201)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 583bf76. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .Rhistory
Ignored: .Rproj.user/
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/R2BGLiMS.Rmd
) and HTML (docs/R2BGLiMS.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
Rmd | 583bf76 | yunqiyang0215 | 2024-02-26 | wflow_publish("analysis/R2BGLiMS.Rmd") |
html | c33caaf | yunqiyang0215 | 2024-02-26 | Build site. |
Rmd | fa2a63b | yunqiyang0215 | 2024-02-26 | wflow_publish("analysis/R2BGLiMS.Rmd") |
html | 7dc4c98 | yunqiyang0215 | 2024-01-18 | Build site. |
Rmd | 5ef9ce0 | yunqiyang0215 | 2024-01-18 | wflow_publish("analysis/R2BGLiMS.Rmd") |
html | 2c66000 | yunqiyang0215 | 2024-01-18 | Build site. |
Rmd | a6faa50 | yunqiyang0215 | 2024-01-18 | wflow_publish("analysis/R2BGLiMS.Rmd") |
Note: the default n.iter = 1e6. This method needs large number of iterations to converge. n.iter = 1e3 and n.iter = 1e6 can produce very different results.
#install_github("pjnewcombe/R2BGLiMS")
library(R2BGLiMS)
# https://github.com/pjnewcombe/R2BGLiMS/blob/master/Examples/R2BGLiMS_Examples.R
# Example usage from the package
utils::data(VA, package = "MASS")
predictors <- c("treat","age","Karn","diag.time","prior")
for (v in predictors) {VA[,v] <- scale(as.numeric(VA[,v]))} # Normalise predictors
VA$stime <- VA$stime/max(VA$stime)# Recommend scaling survival times to between 0 and 1
va.results.weibull <- R2BGLiMS(
likelihood="Weibull",
data=VA,
outcome.var="status",
times.var="stime",
model.space.priors=list(list("a"=1,"b"=length(predictors),"Variables"=predictors)) # Beta-binomial(1,P) model space prior
)
plot(va.results.weibull@mcmc.output[,"LogLikelihood"], type="l") # Looks ok
ManhattanPlot(va.results.weibull) # Clear signal at Kern
va.results.weibull@posterior.summary.table
TopModels(va.results.weibull)
dat = readRDS("./data/sim_dat_censoring.rds")
p = 50
X = as.data.frame(dat[[1]][, c(2:(p+1))])
data = dat[[1]]
data$surT = data$surT/max(data$surT)
predictors = names(data)[2:51]
for (v in predictors) {data[,v] <- scale(as.numeric(data[,v]))} # Normalise predictors
res <- R2BGLiMS(
likelihood="Weibull",
data=data,
outcome.var="status",
times.var="surT",
model.space.priors=list(list("a"=1,"b"=length(predictors),"Variables"=predictors)) # Beta-binomial(1,P) model space prior
)
plot(res@mcmc.output[,"LogLikelihood"], type="l") # Looks ok
Version | Author | Date |
---|---|---|
2c66000 | yunqiyang0215 | 2024-01-18 |
ManhattanPlot(res) # Clear signal at Kern
Version | Author | Date |
---|---|---|
2c66000 | yunqiyang0215 | 2024-01-18 |
res@posterior.summary.table
PostProb Median CrI_Lower CrI_Upper Median_Present
LogWeibullScale NA 0.1610626 -0.03859787 0.3430198 NA
alpha NA 1.3523057 1.00867924 1.6926551 NA
x1 0.0118 1.0000000 1.00000000 1.0000000 1.0298616
x2 0.0078 1.0000000 1.00000000 1.0000000 0.9222471
x3 0.0074 1.0000000 1.00000000 1.0000000 0.9825414
x4 0.0840 1.0000000 0.68725426 1.0000000 0.7509737
x5 0.0066 1.0000000 1.00000000 1.0000000 1.0308882
x6 0.0116 1.0000000 1.00000000 1.0000000 0.9928074
x7 0.0192 1.0000000 1.00000000 1.0000000 1.1608772
x8 0.0104 1.0000000 1.00000000 1.0000000 1.0279673
x9 0.0100 1.0000000 1.00000000 1.0000000 0.9720276
x10 0.0114 1.0000000 1.00000000 1.0000000 1.0916807
x11 0.0092 1.0000000 1.00000000 1.0000000 1.0756126
x12 0.0242 1.0000000 1.00000000 1.0000000 1.1541694
x13 0.0134 1.0000000 1.00000000 1.0000000 1.0701177
x14 0.0098 1.0000000 1.00000000 1.0000000 0.9840410
x15 0.0146 1.0000000 1.00000000 1.0000000 0.9182738
x16 0.0172 1.0000000 1.00000000 1.0000000 1.1671183
x17 0.0140 1.0000000 1.00000000 1.0000000 1.0645570
x18 0.0082 1.0000000 1.00000000 1.0000000 0.9912891
x19 0.0100 1.0000000 1.00000000 1.0000000 0.9768022
x20 0.0208 1.0000000 1.00000000 1.0000000 1.1171953
x21 0.0096 1.0000000 1.00000000 1.0000000 1.0211766
x22 0.0106 1.0000000 1.00000000 1.0000000 1.0555998
x23 0.0134 1.0000000 1.00000000 1.0000000 1.0602316
x24 0.0088 1.0000000 1.00000000 1.0000000 0.9907174
x25 0.0108 1.0000000 1.00000000 1.0000000 1.0144766
x26 0.0092 1.0000000 1.00000000 1.0000000 1.0446394
x27 0.0114 1.0000000 1.00000000 1.0000000 1.0142065
x28 0.0122 1.0000000 1.00000000 1.0000000 1.0151620
x29 0.0092 1.0000000 1.00000000 1.0000000 0.9914933
x30 0.0182 1.0000000 1.00000000 1.0000000 0.9119851
x31 0.0094 1.0000000 1.00000000 1.0000000 1.0387009
x32 0.0120 1.0000000 1.00000000 1.0000000 0.9960081
x33 0.0432 1.0000000 0.86422280 1.0000000 0.8425086
x34 0.0114 1.0000000 1.00000000 1.0000000 0.9912316
x35 0.0080 1.0000000 1.00000000 1.0000000 1.0380251
x36 0.0118 1.0000000 1.00000000 1.0000000 1.0752425
x37 0.0150 1.0000000 1.00000000 1.0000000 1.0737083
x38 0.0132 1.0000000 1.00000000 1.0000000 0.9124204
x39 0.0114 1.0000000 1.00000000 1.0000000 1.0122803
x40 0.0106 1.0000000 1.00000000 1.0000000 0.9755629
x41 0.0088 1.0000000 1.00000000 1.0000000 0.9723356
x42 0.0130 1.0000000 1.00000000 1.0000000 0.9476594
x43 0.0100 1.0000000 1.00000000 1.0000000 0.9707956
x44 0.0118 1.0000000 1.00000000 1.0000000 1.0186080
x45 0.0106 1.0000000 1.00000000 1.0000000 0.9708240
x46 0.0094 1.0000000 1.00000000 1.0000000 0.9868755
x47 0.0206 1.0000000 1.00000000 1.0000000 1.1175214
x48 0.0110 1.0000000 1.00000000 1.0000000 1.0267645
x49 0.0102 1.0000000 1.00000000 1.0000000 1.0061941
x50 0.0120 1.0000000 1.00000000 1.0000000 0.9651467
LogBetaPriorSd1 NA -1.4779983 -2.91948901 0.5516384 NA
LogLikelihood NA 10.6204232 7.55639267 14.3789036 NA
ModelSizePartition1 NA 0.0000000 0.00000000 4.0000000 NA
CrI_Lower_Present CrI_Upper_Present Mean BF
LogWeibullScale NA NA 1.578727e-01 NA
alpha NA NA 1.353113e+00 NA
x1 0.8385173 1.2278986 4.056603e-04 0.5970451
x2 0.8036259 1.1442149 -4.890066e-04 0.3930659
x3 0.8432772 1.1475181 -1.005020e-04 0.3727584
x4 0.5551397 0.9953443 -2.411827e-02 4.5851528
x5 0.8462231 1.2160924 1.171213e-04 0.3321925
x6 0.7806497 1.1743874 -3.116115e-04 0.5868070
x7 0.9345827 1.5390479 3.071849e-03 0.9787928
x8 0.8650605 1.1890042 2.495298e-04 0.5254648
x9 0.7897455 1.1616287 -2.914539e-04 0.5050505
x10 0.9659762 1.2375802 9.731853e-04 0.5765729
x11 0.9480440 1.3255075 7.321774e-04 0.4642713
x12 0.9356364 1.6105462 3.866233e-03 1.2400082
x13 0.9104773 1.3227697 1.128948e-03 0.6790999
x14 0.6888248 1.2365271 -5.113222e-04 0.4948495
x15 0.6814959 1.0579827 -1.364633e-03 0.7408159
x16 0.9399044 1.4903562 2.835523e-03 0.8750509
x17 0.9104347 1.4991328 1.271044e-03 0.7099391
x18 0.7868482 1.2221227 -1.469781e-04 0.4133898
x19 0.8391067 1.0996349 -3.128983e-04 0.5050505
x20 0.9621975 1.3337463 2.271505e-03 1.0620915
x21 0.8473778 1.3050489 1.638223e-04 0.4846527
x22 0.8479096 1.3775563 5.490915e-04 0.5356782
x23 0.8954653 1.3838672 9.878134e-04 0.6790999
x24 0.7840380 1.1770972 -1.146439e-04 0.4439064
x25 0.8561833 1.2140222 2.657550e-04 0.5458957
x26 0.8916557 1.2950255 4.094429e-04 0.4642713
x27 0.8980633 1.1307724 1.203900e-04 0.5765729
x28 0.8906966 1.1841907 2.705756e-04 0.6175339
x29 0.8285485 1.2325198 -8.258274e-05 0.4642713
x30 0.6533845 1.0925309 -2.022213e-03 0.9268690
x31 0.9113874 1.3556771 4.821317e-04 0.4744599
x32 0.8203374 1.2333048 -6.532424e-05 0.6072874
x33 0.6207846 1.0124556 -7.941090e-03 2.2575251
x34 0.8113243 1.1354075 -1.424641e-04 0.5765729
x35 0.9316220 1.3358990 4.128845e-04 0.4032258
x36 0.9432339 1.3596241 9.974137e-04 0.5970451
x37 0.9277349 1.3091062 1.216866e-03 0.7614213
x38 0.7204585 1.0625170 -1.322034e-03 0.6688285
x39 0.8903351 1.2675370 4.505318e-04 0.5765729
x40 0.8387929 1.2300552 -1.198295e-04 0.5356782
x41 0.8132461 1.0930012 -3.623641e-04 0.4439064
x42 0.7454924 1.0759765 -1.045615e-03 0.6585613
x43 0.7984339 1.1930454 -2.013416e-04 0.5050505
x44 0.8445735 1.1741158 2.580343e-04 0.5970451
x45 0.7157204 1.1173178 -5.617284e-04 0.5356782
x46 0.8560917 1.2757090 -6.113719e-05 0.4744599
x47 0.9175270 1.5853009 2.567450e-03 1.0516643
x48 0.9138974 1.2310802 3.963654e-04 0.5561173
x49 0.9152075 1.1897003 1.340182e-04 0.5152556
x50 0.7970702 1.1196662 -4.178370e-04 0.6072874
LogBetaPriorSd1 NA NA -1.366380e+00 NA
LogLikelihood NA NA 1.058359e+01 NA
ModelSizePartition1 NA NA NA NA
TopModels(res)
x4 x7 x10 x12 x14 x15 x16 x17 x19 x20 x23 x28 x30 x33 x37 x38 x42 x47
[1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[2,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[3,] 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
[4,] 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[5,] 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
[6,] 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
[7,] 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
[8,] 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
[9,] 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[10,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
[11,] 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
[12,] 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[13,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
[14,] 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
[15,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
[16,] 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
[17,] 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
[18,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
[19,] 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
[20,] 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Post Prob
[1,] 0.6032
[2,] 0.0364
[3,] 0.0118
[4,] 0.0086
[5,] 0.0082
[6,] 0.0070
[7,] 0.0068
[8,] 0.0064
[9,] 0.0064
[10,] 0.0058
[11,] 0.0058
[12,] 0.0050
[13,] 0.0048
[14,] 0.0048
[15,] 0.0046
[16,] 0.0046
[17,] 0.0046
[18,] 0.0044
[19,] 0.0044
[20,] 0.0042
p = 50
X = as.data.frame(dat[[3]][, c(2:(p+1))])
data = dat[[3]]
data$surT = data$surT/max(data$surT)
predictors = names(data)[2:51]
for (v in predictors) {data[,v] <- scale(as.numeric(data[,v]))} # Normalise predictors
res <- R2BGLiMS(
likelihood="Weibull",
data=data,
outcome.var="status",
times.var="surT",
model.space.priors=list(list("a"=1,"b"=length(predictors),"Variables"=predictors)) # Beta-binomial(1,P) model space prior
)
plot(res@mcmc.output[,"LogLikelihood"], type="l") # Looks ok
Version | Author | Date |
---|---|---|
2c66000 | yunqiyang0215 | 2024-01-18 |
ManhattanPlot(res) # Clear signal at Kern
Version | Author | Date |
---|---|---|
2c66000 | yunqiyang0215 | 2024-01-18 |
res@posterior.summary.table
PostProb Median CrI_Lower CrI_Upper
LogWeibullScale NA 0.12236750 -0.07551654 0.31240622
alpha NA 7.95033789 6.46708601 9.58694336
x1 1.0000 0.03023852 0.01419267 0.05926351
x2 0.0014 1.00000000 1.00000000 1.00000000
x3 0.0036 1.00000000 1.00000000 1.00000000
x4 0.1072 1.00000000 0.59211368 1.00000000
x5 0.0022 1.00000000 1.00000000 1.00000000
x6 0.0052 1.00000000 1.00000000 1.00000000
x7 0.0104 1.00000000 1.00000000 1.00000000
x8 0.0018 1.00000000 1.00000000 1.00000000
x9 0.0034 1.00000000 1.00000000 1.00000000
x10 0.0022 1.00000000 1.00000000 1.00000000
x11 0.0038 1.00000000 1.00000000 1.00000000
x12 0.0058 1.00000000 1.00000000 1.00000000
x13 0.0048 1.00000000 1.00000000 1.00000000
x14 0.0038 1.00000000 1.00000000 1.00000000
x15 0.0048 1.00000000 1.00000000 1.00000000
x16 0.0062 1.00000000 1.00000000 1.00000000
x17 0.0030 1.00000000 1.00000000 1.00000000
x18 0.0028 1.00000000 1.00000000 1.00000000
x19 0.0024 1.00000000 1.00000000 1.00000000
x20 0.0070 1.00000000 1.00000000 1.00000000
x21 0.0024 1.00000000 1.00000000 1.00000000
x22 0.0024 1.00000000 1.00000000 1.00000000
x23 0.0042 1.00000000 1.00000000 1.00000000
x24 0.0020 1.00000000 1.00000000 1.00000000
x25 0.0024 1.00000000 1.00000000 1.00000000
x26 0.0038 1.00000000 1.00000000 1.00000000
x27 0.0020 1.00000000 1.00000000 1.00000000
x28 0.0016 1.00000000 1.00000000 1.00000000
x29 0.0022 1.00000000 1.00000000 1.00000000
x30 0.0040 1.00000000 1.00000000 1.00000000
x31 0.0038 1.00000000 1.00000000 1.00000000
x32 0.0016 1.00000000 1.00000000 1.00000000
x33 0.0136 1.00000000 1.00000000 1.00000000
x34 0.0016 1.00000000 1.00000000 1.00000000
x35 0.0038 1.00000000 1.00000000 1.00000000
x36 0.0028 1.00000000 1.00000000 1.00000000
x37 0.0054 1.00000000 1.00000000 1.00000000
x38 0.0078 1.00000000 1.00000000 1.00000000
x39 0.0030 1.00000000 1.00000000 1.00000000
x40 0.0036 1.00000000 1.00000000 1.00000000
x41 0.0006 1.00000000 1.00000000 1.00000000
x42 0.0050 1.00000000 1.00000000 1.00000000
x43 0.0032 1.00000000 1.00000000 1.00000000
x44 0.0018 1.00000000 1.00000000 1.00000000
x45 0.0022 1.00000000 1.00000000 1.00000000
x46 0.0016 1.00000000 1.00000000 1.00000000
x47 0.0040 1.00000000 1.00000000 1.00000000
x48 0.0032 1.00000000 1.00000000 1.00000000
x49 0.0034 1.00000000 1.00000000 1.00000000
x50 0.0020 1.00000000 1.00000000 1.00000000
LogBetaPriorSd1 NA 0.52856576 0.08858108 0.68659782
LogLikelihood NA 363.52391316 359.70265021 368.13935461
ModelSizePartition1 NA 1.00000000 1.00000000 3.00000000
Median_Present CrI_Lower_Present CrI_Upper_Present
LogWeibullScale NA NA NA
alpha NA NA NA
x1 0.03023852 0.01419267 0.05926351
x2 0.92737944 0.78660828 1.11627197
x3 1.07037826 0.88029152 1.30421132
x4 0.66139254 0.49850921 0.88754879
x5 0.97300508 0.84937141 1.30131596
x6 0.84577574 0.69490419 1.10002146
x7 1.37241132 0.99110997 1.76544080
x8 1.03569991 0.90928340 1.42834813
x9 0.90648647 0.74975547 1.33963364
x10 1.16818488 1.00029358 1.39904186
x11 1.08021189 0.95106846 1.43795758
x12 1.23762253 0.95447797 1.45459773
x13 1.09497550 0.96417597 1.25799046
x14 0.84766746 0.63639662 1.24174734
x15 0.87740256 0.72021105 1.10293270
x16 1.12329962 0.84013196 1.52576618
x17 1.00294345 0.81762189 1.19610846
x18 0.91337804 0.76212527 1.13935775
x19 0.89111186 0.69045290 1.15375079
x20 1.17176400 1.01255282 1.56961341
x21 1.01972408 0.75963457 1.51985197
x22 1.06774112 0.90255730 1.34154502
x23 1.13096893 0.91266221 1.42275938
x24 0.99033068 0.85597885 1.19666030
x25 1.13676514 0.93251983 1.51059289
x26 1.14861382 0.84092548 1.36306584
x27 1.05806722 0.84521836 1.27599493
x28 0.98740428 0.84658278 1.29534760
x29 0.91733828 0.72261299 1.04771945
x30 0.80349983 0.64794159 0.97783568
x31 1.11995460 0.95027721 1.38163473
x32 0.91496486 0.82751425 1.00559323
x33 0.75817889 0.58958838 0.96269796
x34 0.99444927 0.85294002 1.13452680
x35 1.22810317 0.86490327 1.57817032
x36 1.26545646 1.08489179 1.44278095
x37 1.21197206 0.94823085 1.55068875
x38 0.79141100 0.62889227 1.08519575
x39 1.05102374 0.90685548 1.25888537
x40 0.86515512 0.59132322 1.10234725
x41 0.81800005 0.61256748 0.83053554
x42 0.83171280 0.63395963 1.15448249
x43 0.97629304 0.78450731 1.21679784
x44 1.07847279 0.95307736 1.34293794
x45 0.89996482 0.63061960 1.01463950
x46 0.94275085 0.82582540 1.13403138
x47 1.24550926 1.00478632 1.46070033
x48 1.16367611 0.79623921 1.43257329
x49 0.98209981 0.81224269 1.28655332
x50 0.89761196 0.74485291 1.05713501
LogBetaPriorSd1 NA NA NA
LogLikelihood NA NA NA
ModelSizePartition1 NA NA NA
Mean BF
LogWeibullScale 1.206658e-01 NA
alpha 7.972343e+00 NA
x1 -3.506423e+00 Inf
x2 -1.190127e-04 0.07009814
x3 2.213919e-04 0.18065034
x4 -4.514038e-02 6.00358423
x5 3.900964e-05 0.11024253
x6 -8.834591e-04 0.26135907
x7 3.050797e-03 0.52546483
x8 1.817279e-04 0.09016229
x9 -1.796368e-04 0.17057997
x10 3.075985e-04 0.11024253
x11 4.518225e-04 0.19072475
x12 1.042631e-03 0.29169181
x13 4.345822e-04 0.24115756
x14 -5.082639e-04 0.19072475
x15 -6.348838e-04 0.24115756
x16 7.511297e-04 0.31193399
x17 8.888405e-05 0.15045135
x18 -2.199700e-04 0.14039310
x19 -2.807545e-04 0.12028869
x20 1.428588e-03 0.35246727
x21 9.544754e-05 0.12028869
x22 1.773674e-04 0.12028869
x23 5.788534e-04 0.21088572
x24 -2.620560e-05 0.10020040
x25 3.509216e-04 0.12028869
x26 3.235943e-04 0.19072475
x27 1.004083e-04 0.10020040
x28 2.901547e-05 0.08012821
x29 -2.097006e-04 0.11024253
x30 -8.429661e-04 0.20080321
x31 4.791545e-04 0.19072475
x32 -1.462143e-04 0.08012821
x33 -3.770174e-03 0.68937551
x34 -3.986207e-05 0.08012821
x35 7.070586e-04 0.19072475
x36 6.623607e-04 0.14039310
x37 1.128060e-03 0.27146592
x38 -1.602672e-03 0.39306591
x39 1.705205e-04 0.15045135
x40 -6.292833e-04 0.18065034
x41 -1.782189e-04 0.03001801
x42 -8.342476e-04 0.25125628
x43 -9.716610e-05 0.16051364
x44 1.958192e-04 0.09016229
x45 -3.496646e-04 0.11024253
x46 -7.797412e-05 0.08012821
x47 7.947212e-04 0.20080321
x48 3.281897e-04 0.16051364
x49 4.842834e-05 0.17057997
x50 -2.205591e-04 0.10020040
LogBetaPriorSd1 4.904015e-01 NA
LogLikelihood 3.634793e+02 NA
ModelSizePartition1 NA NA
TopModels(res)
x1 x4 x6 x7 x12 x13 x14 x15 x16 x20 x26 x30 x33 x35 x37 x38 x40 x42 x47
[1,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[2,] 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[3,] 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
[4,] 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[5,] 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
[6,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
[7,] 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[8,] 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
[9,] 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
[10,] 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
[11,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
[12,] 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[13,] 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
[14,] 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
[15,] 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
[16,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
[17,] 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
[18,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
[19,] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
[20,] 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
Post Prob
[1,] 0.7658
[2,] 0.0784
[3,] 0.0064
[4,] 0.0060
[5,] 0.0054
[6,] 0.0044
[7,] 0.0040
[8,] 0.0038
[9,] 0.0038
[10,] 0.0036
[11,] 0.0034
[12,] 0.0034
[13,] 0.0034
[14,] 0.0032
[15,] 0.0032
[16,] 0.0030
[17,] 0.0030
[18,] 0.0028
[19,] 0.0028
[20,] 0.0028
p = 50
X = as.data.frame(dat[[5]][, c(2:(p+1))])
data = dat[[5]]
data$surT = data$surT/max(data$surT)
predictors = names(data)[2:51]
for (v in predictors) {data[,v] <- scale(as.numeric(data[,v]))} # Normalise predictors
res <- R2BGLiMS(
likelihood="Weibull",
data=data,
outcome.var="status",
times.var="surT",
model.space.priors=list(list("a"=1,"b"=length(predictors),"Variables"=predictors)) # Beta-binomial(1,P) model space prior
)
plot(res@mcmc.output[,"LogLikelihood"], type="l") # Looks ok
Version | Author | Date |
---|---|---|
2c66000 | yunqiyang0215 | 2024-01-18 |
ManhattanPlot(res) # Clear signal at Kern
Version | Author | Date |
---|---|---|
2c66000 | yunqiyang0215 | 2024-01-18 |
res@posterior.summary.table
PostProb Median CrI_Lower CrI_Upper
LogWeibullScale NA 0.12434979 -0.06097042 0.3103664
alpha NA 12.44247878 10.33900482 14.9628292
x1 1.0000 0.07206508 0.03227540 0.1680171
x2 1.0000 0.17547609 0.08889487 0.3519736
x3 0.0100 1.00000000 1.00000000 1.0000000
x4 0.4772 1.00000000 0.20950859 1.0000000
x5 0.0140 1.00000000 1.00000000 1.0000000
x6 0.0226 1.00000000 1.00000000 1.0000000
x7 0.0302 1.00000000 1.00000000 1.1597917
x8 0.0100 1.00000000 1.00000000 1.0000000
x9 0.0106 1.00000000 1.00000000 1.0000000
x10 0.0088 1.00000000 1.00000000 1.0000000
x11 0.0232 1.00000000 1.00000000 1.0000000
x12 0.0284 1.00000000 1.00000000 1.1448276
x13 0.0268 1.00000000 1.00000000 1.0000000
x14 0.0232 1.00000000 1.00000000 1.0000000
x15 0.0244 1.00000000 1.00000000 1.0000000
x16 0.0134 1.00000000 1.00000000 1.0000000
x17 0.0226 1.00000000 1.00000000 1.0000000
x18 0.0082 1.00000000 1.00000000 1.0000000
x19 0.0180 1.00000000 1.00000000 1.0000000
x20 0.0242 1.00000000 1.00000000 1.0000000
x21 0.0140 1.00000000 1.00000000 1.0000000
x22 0.0220 1.00000000 1.00000000 1.0000000
x23 0.0526 1.00000000 1.00000000 1.9535440
x24 0.0124 1.00000000 1.00000000 1.0000000
x25 0.0214 1.00000000 1.00000000 1.0000000
x26 0.0160 1.00000000 1.00000000 1.0000000
x27 0.0120 1.00000000 1.00000000 1.0000000
x28 0.0108 1.00000000 1.00000000 1.0000000
x29 0.0108 1.00000000 1.00000000 1.0000000
x30 0.0358 1.00000000 0.76005756 1.0000000
x31 0.0110 1.00000000 1.00000000 1.0000000
x32 0.0146 1.00000000 1.00000000 1.0000000
x33 0.0292 1.00000000 0.93687492 1.0000000
x34 0.0122 1.00000000 1.00000000 1.0000000
x35 0.0266 1.00000000 1.00000000 1.0000000
x36 0.0148 1.00000000 1.00000000 1.0000000
x37 0.0208 1.00000000 1.00000000 1.0000000
x38 0.0200 1.00000000 1.00000000 1.0000000
x39 0.0200 1.00000000 1.00000000 1.0000000
x40 0.0144 1.00000000 1.00000000 1.0000000
x41 0.0106 1.00000000 1.00000000 1.0000000
x42 0.0190 1.00000000 1.00000000 1.0000000
x43 0.0146 1.00000000 1.00000000 1.0000000
x44 0.0088 1.00000000 1.00000000 1.0000000
x45 0.0088 1.00000000 1.00000000 1.0000000
x46 0.0082 1.00000000 1.00000000 1.0000000
x47 0.0438 1.00000000 1.00000000 1.7117875
x48 0.0700 1.00000000 1.00000000 2.2163099
x49 0.0100 1.00000000 1.00000000 1.0000000
x50 0.0146 1.00000000 1.00000000 1.0000000
LogBetaPriorSd1 NA 0.42047617 -0.11235499 0.6818720
LogLikelihood NA 603.38420186 598.93870499 608.1143559
ModelSizePartition1 NA 3.00000000 2.00000000 7.0000000
Median_Present CrI_Lower_Present CrI_Upper_Present
LogWeibullScale NA NA NA
alpha NA NA NA
x1 0.07206508 0.03227540 0.1680171
x2 0.17547609 0.08889487 0.3519736
x3 1.19926778 0.74077766 2.3535347
x4 0.36058955 0.18228713 0.6994365
x5 1.01140325 0.59836193 2.2030825
x6 0.58812941 0.36407364 1.2419261
x7 1.61631764 0.83183607 3.4214895
x8 1.21096154 0.65058786 2.1313611
x9 1.06615177 0.59396873 1.6334384
x10 1.12739771 0.69380779 1.7335921
x11 1.44080137 0.76961355 2.9630902
x12 1.64917078 0.90494458 2.7615675
x13 1.66611795 0.75686392 2.7616930
x14 0.64818809 0.38537733 1.4681443
x15 0.64340067 0.41013980 1.2106030
x16 1.28677274 0.73532781 1.7431758
x17 1.53177918 0.69395001 2.3788522
x18 1.05830869 0.66004045 1.6427611
x19 1.29548544 0.71122236 2.2740285
x20 1.61567486 0.83847472 3.1118491
x21 0.99390086 0.62488224 1.6429603
x22 1.45927217 0.79538138 3.3531574
x23 1.89940933 0.84852093 3.5040776
x24 1.18746587 0.39766939 1.9874704
x25 1.20006681 0.49704751 2.1643129
x26 1.24483449 0.59113623 2.2914739
x27 1.12602368 0.67397426 2.4400251
x28 0.99324703 0.54402680 2.1510072
x29 0.96037231 0.69207891 1.6934022
x30 0.60679305 0.35025220 1.5690106
x31 1.13760336 0.55078559 1.9002251
x32 0.80758827 0.50741894 1.7872258
x33 0.64826080 0.39388323 1.1120461
x34 0.94667079 0.47119231 1.7428305
x35 1.42157204 0.55131069 2.3298574
x36 1.22551478 0.79400400 1.6731349
x37 1.45773977 0.85027590 2.3521835
x38 0.77719230 0.46187339 1.5148864
x39 1.37885338 0.62171990 2.0909789
x40 1.02528971 0.50692448 1.9046626
x41 0.96554306 0.49113484 1.4263794
x42 0.70656753 0.45962564 1.4182469
x43 0.87524360 0.50940368 1.6967258
x44 1.07255211 0.72191186 1.6484047
x45 0.99313501 0.64370131 1.9146123
x46 0.94914003 0.53030475 1.7103503
x47 1.84494569 0.92007852 3.8332689
x48 2.03341206 0.53660577 3.9101887
x49 1.00346379 0.66556308 1.3253369
x50 1.02947311 0.49871160 2.3037615
LogBetaPriorSd1 NA NA NA
LogLikelihood NA NA NA
ModelSizePartition1 NA NA NA
Mean BF
LogWeibullScale 1.260049e-01 NA
alpha 1.251155e+01 NA
x1 -2.613216e+00 Inf
x2 -1.739525e+00 Inf
x3 2.234121e-03 0.5050505
x4 -4.853147e-01 45.6388676
x5 7.585801e-04 0.7099391
x6 -1.065297e-02 1.1561285
x7 1.418799e-02 1.5570221
x8 2.002793e-03 0.5050505
x9 5.820716e-04 0.5356782
x10 8.077435e-04 0.4439064
x11 9.662843e-03 1.1875512
x12 1.306931e-02 1.4615068
x13 1.235083e-02 1.3769009
x14 -8.325148e-03 1.1875512
x15 -9.813061e-03 1.2505125
x16 2.993333e-03 0.6790999
x17 7.912779e-03 1.1561285
x18 1.355501e-04 0.4133898
x19 4.185207e-03 0.9164969
x20 9.958718e-03 1.2400082
x21 1.774436e-04 0.7099391
x22 9.323754e-03 1.1247444
x23 3.181977e-02 2.7760186
x24 4.364823e-05 0.6277845
x25 2.938029e-03 1.0933987
x26 2.618232e-03 0.8130081
x27 1.786379e-03 0.6072874
x28 5.109008e-04 0.5458957
x29 2.166450e-04 0.5458957
x30 -1.597419e-02 1.8564613
x31 1.015275e-03 0.5561173
x32 -2.646319e-03 0.7408159
x33 -1.234232e-02 1.5039143
x34 -6.878282e-05 0.6175339
x35 7.588579e-03 1.3663448
x36 2.820403e-03 0.7511165
x37 7.855640e-03 1.0620915
x38 -4.699254e-03 1.0204082
x39 5.942469e-03 1.0204082
x40 5.763098e-04 0.7305195
x41 -8.354233e-04 0.5356782
x42 -5.556596e-03 0.9683996
x43 -1.376740e-03 0.7408159
x44 8.621433e-04 0.4439064
x45 3.557325e-04 0.4439064
x46 -3.814944e-04 0.4133898
x47 2.654628e-02 2.2903158
x48 4.101878e-02 3.7634409
x49 2.881808e-05 0.5050505
x50 1.304825e-03 0.7408159
LogBetaPriorSd1 3.868622e-01 NA
LogLikelihood 6.035343e+02 NA
ModelSizePartition1 NA NA
TopModels(res)
x1 x2 x4 x7 x11 x12 x13 x15 x20 x22 x23 x30 x33 x35 x42 x47 x48 Post Prob
[1,] 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3036
[2,] 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1658
[3,] 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0.0208
[4,] 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0.0176
[5,] 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0.0150
[6,] 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0.0108
[7,] 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0.0102
[8,] 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0.0072
[9,] 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0.0068
[10,] 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0066
[11,] 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0.0058
[12,] 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0.0058
[13,] 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0.0056
[14,] 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0.0054
[15,] 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0.0046
[16,] 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0.0046
[17,] 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0.0044
[18,] 1 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0.0042
[19,] 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0.0042
[20,] 1 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0.0040
sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin20.6.0 (64-bit)
Running under: macOS Monterey 12.0.1
Matrix products: default
BLAS: /usr/local/Cellar/openblas/0.3.18/lib/libopenblasp-r0.3.18.dylib
LAPACK: /usr/local/Cellar/r/4.1.1_1/lib/R/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] survival_3.2-11 R2BGLiMS_0.1-07-02-2020 workflowr_1.6.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.8.3 highr_0.9 pillar_1.6.4 compiler_4.1.1
[5] bslib_0.4.1 later_1.3.0 jquerylib_0.1.4 git2r_0.28.0
[9] tools_4.1.1 digest_0.6.28 lattice_0.20-44 jsonlite_1.7.2
[13] evaluate_0.14 lifecycle_1.0.3 tibble_3.1.5 pkgconfig_2.0.3
[17] rlang_1.1.1 Matrix_1.5-3 cli_3.6.1 rstudioapi_0.13
[21] yaml_2.2.1 xfun_0.27 fastmap_1.1.0 stringr_1.4.0
[25] knitr_1.36 fs_1.5.0 vctrs_0.6.3 sass_0.4.4
[29] grid_4.1.1 rprojroot_2.0.2 glue_1.4.2 R6_2.5.1
[33] fansi_0.5.0 rmarkdown_2.11 magrittr_2.0.1 whisker_0.4
[37] splines_4.1.1 promises_1.2.0.1 ellipsis_0.3.2 htmltools_0.5.5
[41] httpuv_1.6.3 utf8_1.2.2 stringi_1.7.5 cachem_1.0.6
[45] crayon_1.4.1