Description Usage Arguments Details Value Author(s) Examples

Functions that allow to generate plots and tables helping in visualizing and summarise Weighted Quantile Sum (WQS) regression results.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ```
gwqs_barplot(object, tau, ...)
gwqs_scatterplot(object, ...)
gwqs_fitted_vs_resid(object, sumtype = c("norm", "perc"), ...)
gwqs_levels_scatterplot(object, ...)
gwqs_ROC(object, newdata, sumtype = c("norm", "perc"), ...)
gwqsrh_boxplot(object, tau, ...)
gwqs_summary_tab(object, sumtype = c("norm", "perc"), ...)
gwqs_weights_tab(object, ...)
selectdatavars(data, na.action, formula, mix_name, ...)
gwqs_rank(data, mix_name, q)
``` |

`object` |
An object of class "gwqs" as returned by |

`tau` |
A number identifying the cutoff for the significant weights. Is tau is missing then reciprocal of
the number of elements in the mixture is considered. To avoid printing the threshold line set |

`...` |
Further arguments to be passed to the function. |

`sumtype` |
Type of summary statistic to be used: "norm" takes the mean of the estimated parameters on the
validation sets and the 95
as the parameters estimates and the 2.5, 97.5 percentiles as CI. This option is only available for objects of
class |

`newdata` |
A data frame in which to look for variables with which to predict and generate the ROC curve. |

`data` |
Dataset from which you want to select the variables you are interested in. |

`na.action` |
Allows to choose what action has to be taken to deal with NAs. |

`formula` |
Formula used in the model to specify the dependent and independent variables. |

`mix_name` |
Vector containing element names included in the mixture. |

`q` |
An |

The `gwqs_barplot`

, `gwqs_scatterplot`

, `gwqs_fitted_vs_resid`

, `gwqs_levels_scatterplot`

,
`gwqs_ROC`

and `gwqsrh_boxplot`

functions produce five figures through the `ggplot`

function.

The `gwqs_summary_tab`

and `gwqs_weights_tab`

functions produce two tables in the viewr pane
through the use of the `kable`

and `kable_styling`

functions.

The `gwqs_barplot`

, `gwqs_scatterplot`

plots are available for all family types while
`gwqs_fitted_vs_resid`

is not available when `family = binomial`

or `"multinomial"`

.
`gwqs_levels_scatterplot`

plot is only available when `family = "multinomial"`

and `gwqs_ROC`

when `family = binomial`

. All these plots can also be applied to the objects of class `gwqsrh`

.
For these objects an additional plot is available through the function `gwqs_boxplot`

.

The `gwqs_rank`

function allows to split the variables selected through the vector `mix_name`

in quantiles (depending by the value assigned to `q`

).

All the plot functions print the output in the Plots pane while the table functions print the output in the Viewer pane.

`Qm` |
The matrix containing the quantiled variables of the elements included in the mixture. |

`qi` |
A list of vectors containing the cut points used to determine the quantiled variables. |

Stefano Renzetti, Paul Curtin, Allan C Just, Ghalib Bello, Chris Gennings

1 2 3 4 5 6 7 8 9 10 11 12 | ```
toxic_chems = names(wqs_data)[1:34]
results = gwqs(yLBX ~ wqs, mix_name = toxic_chems, data = wqs_data, q = 4, validation = 0.6,
b = 1, b1_pos = TRUE, b1_constr = FALSE, family = gaussian)
# barplot
gwqs_barplot(results)
# scatterplot
gwqs_scatterplot(results)
# fitted values vs rediduals scatterplot
gwqs_fitted_vs_resid(results)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.