# \donttest{
library(gWQS)
# mixture names
PCBs <- names(wqs_data)[1:10] #10 of the original 34 for a quick example
#quick example WQSPT model
perm_test_res <- wqs_full_perm(formula = yLBX ~ wqs, data = wqs_data,
mix_name = PCBs, q = 10, b_main = 4,
b_perm = 4, b1_pos = TRUE, b_constr = FALSE,
niter = 3, seed = 16,
plan_strategy = "multicore",
stop_if_nonsig = FALSE)
#plot with continuous heatmap for mixture weights, omitting the heatmap
# legend on the plot
wqsptplot <- wqspt_plot(perm_test_res)
#plot the full plot with the WQS coefficient forest plot above & the mixture
# weight heatmap below
wqsptplot$FullPlot
#plot with binned heatmap for mixture weights
wqsptplot <- wqspt_plot(perm_test_res, InclKey = TRUE, LegendWidthIn = 0.8,
FixedPalette = TRUE)
#plot the full plot with the WQS coefficient forest plot above & the mixture
# weight heatmap below
wqsptplot$FullPlot
# }
Run the code above in your browser using DataLab