parameterise_contrast_2l | R Documentation |
This function is used to define and visualise a contrast between two factor levels (e.g. the difference in depth between males and females). Simulated contrasts can be compared to estimated contrasts from an mgcv
generalised additive model (GAM). The function is intended primarily for use behind-the-scenes in GAMS4DTS
.
parameterise_contrast_2l( x = factor(c("F", "M")), param = 0, plot_gam = FALSE, dat, model, term = "sex", cex.axis = 1, mtext_args = list(list(side = 1, text = "Sex (F, female; M, male)", line = 2.5), list(side = 2, text = "Contrast (m)", line = 2.5)) )
x |
A vector of two factor levels for which to define a contrast. |
param |
A numeric input which defines the size of the contrast between two factor levels. |
plot_gam |
A logical input which defines whether or not to add model estimates to the plot. |
dat |
The dataframe used to fit the model. |
model |
The model. |
term |
A character input which defines the name of the term in the model. |
cex.axis |
A numeric input which defines the size of the font for axis tick labels. |
mtext_args |
A named list of arguments which are passed to |
The function returns a plot showing the size of the contrast between factor levels, possibly in relation to that estimated by an mgcv
GAM model.
Edward Lavender
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.