Summary for bdlim4
Usage
# S3 method for bdlim4
summary(object, model = NULL, ...)
Arguments
- object
An object of class bdlim4.
- model
Pattern of heterogeneity to be printed. If not specified (default) the best fitting model will be used. Options are "n", "b", "w" and "bw" where b indicates the effect sizes are subgroup specific and w indicates the weight functions are subgroups specific.
- ...
Other arguments
Examples
# \donttest{
# run BDLIM with modification by ChildSex
fit_sex <- bdlim4(
y = sbd_bdlim$bwgaz,
exposure = sbd_bdlim[,paste0("pm25_",1:37)],
covars = sbd_bdlim[,c("MomPriorBMI","MomAge","race","Hispanic",
"EstMonthConcept","EstYearConcept")],
group = as.factor(sbd_bdlim$ChildSex),
df = 5,
nits = 5000,
parallel = FALSE
)
#> fitting bw
#> fitting b
#> fitting w
#> fitting n
#> postprocessing
#> postprocessing
#summarize results
summary(fit_sex)
#>
#> Call:
#> bdlim4(y = sbd_bdlim$bwgaz, exposure = sbd_bdlim[, paste0("pm25_",
#> 1:37)], covars = sbd_bdlim[, c("MomPriorBMI", "MomAge", "race",
#> "Hispanic", "EstMonthConcept", "EstYearConcept")], group = as.factor(sbd_bdlim$ChildSex),
#> df = 5, nits = 5000, parallel = FALSE)
#>
#>
#> Model fit statistics:
#> *bw* b w n
#> 0.5132 0.3744 0.1112 0.0012
#>
#>
#> Estimated cumulative effects:
#> group mean median sd q2.5 q97.5 pr_gr0
#> F -0.01741203 -0.00775538 0.05971037 -0.1611360 0.09113099 0.404
#> M -0.40994600 -0.40843058 0.07835665 -0.5707941 -0.26191732 0.000
#>
#>
#> Estimated covariate regression coefficients:
#> name mean median sd q2.5
#> interceptF 5.402642055 5.475361929 6.203871753 -6.766188833
#> interceptM 5.646737768 5.631934426 6.201804743 -6.482507436
#> MomPriorBMI -0.015899209 -0.015894014 0.003221227 -0.022239377
#> MomAge 0.001065922 0.001048039 0.003032500 -0.004654680
#> raceAsianPI -0.024500844 -0.024828373 0.174628731 -0.346023915
#> raceBlack -0.106492691 -0.108712158 0.178326428 -0.450280359
#> racewhite -0.053429766 -0.059019758 0.166850422 -0.366669390
#> HispanicNonHispanic 0.255361171 0.254799492 0.039680832 0.176639039
#> EstMonthConcept2 -0.159571269 -0.160271710 0.095309555 -0.345431373
#> EstMonthConcept3 -0.102292394 -0.103811710 0.097376870 -0.298760039
#> EstMonthConcept4 -0.162969236 -0.165089170 0.094496459 -0.345483347
#> EstMonthConcept5 -0.090861523 -0.089248931 0.090098790 -0.267046795
#> EstMonthConcept6 -0.191895455 -0.190971103 0.084444264 -0.362683187
#> EstMonthConcept7 -0.047425417 -0.044641564 0.088975310 -0.224652247
#> EstMonthConcept8 0.156872418 0.156258289 0.098837712 -0.038758562
#> EstMonthConcept9 0.335451548 0.335775255 0.096359715 0.143927265
#> EstMonthConcept10 0.440784308 0.436194327 0.096049046 0.256603731
#> EstMonthConcept11 0.242531908 0.240389525 0.090081410 0.071789991
#> EstMonthConcept12 0.081067937 0.080794912 0.084468749 -0.082479908
#> EstYearConcept -0.001989494 -0.001988871 0.003080926 -0.007939235
#> q97.5 pr_gr0
#> 17.454744725 0.7988
#> 17.583726777 0.8096
#> -0.009738187 0.0000
#> 0.007108840 0.6368
#> 0.315245458 0.4432
#> 0.249419233 0.2704
#> 0.276594073 0.3800
#> 0.331660502 1.0000
#> 0.027678415 0.0472
#> 0.082586986 0.1480
#> 0.027860376 0.0496
#> 0.077403374 0.1532
#> -0.032134712 0.0140
#> 0.123490167 0.2988
#> 0.350690532 0.9456
#> 0.526021271 1.0000
#> 0.636701464 1.0000
#> 0.430474314 0.9988
#> 0.251292731 0.8376
#> 0.004099298 0.2724
#>
#>
#> BDLIM fit on 1000 observations. Estimated residual standard deviation is 0.541 (0.518,0.565). WAIC is 1635.241.
#>
#> Use `plot(); for the summary.bdlim4 object to view estimated distributed lag functions. The `dlfun' object in the summary object contains estimates of the lag functions.
# obtain estimates of the distributed lag function
# these are note displayed when printed but available for use
sfit_sex <- summary(fit_sex)
head(sfit_sex$dlfun)
#> group time mean median sd q2.5 q97.5
#> 1 F 1 -0.0001413253 0.0000102025 0.008083752 -0.01829046 0.016502901
#> 2 F 2 -0.0010414752 -0.0005015613 0.006550896 -0.01578369 0.011909443
#> 3 F 3 -0.0019133596 -0.0012301073 0.005326906 -0.01417740 0.008311934
#> 4 F 4 -0.0027287131 -0.0020721735 0.004599541 -0.01313611 0.005337971
#> 5 F 5 -0.0034592699 -0.0025941813 0.004473601 -0.01345186 0.003657138
#> 6 F 6 -0.0040767648 -0.0030533167 0.004814222 -0.01540579 0.002835063
#> pr_gr0
#> 1 0.5028
#> 2 0.4376
#> 3 0.3540
#> 4 0.2768
#> 5 0.2120
#> 6 0.1940
# can summarize with a specific model
sfit_hisp_n <- summary(fit_sex, model="n") # no modification
sfit_hisp_b <- summary(fit_sex, model="b") # subgroup-specific effects (beta)
sfit_hisp_w <- summary(fit_sex, model="w") # subgroup-specific weight function
sfit_hisp_bw <- summary(fit_sex, model="bw") # both subgroup-specific
# }