Description Usage Arguments Value Author(s) Examples
View source: R/VisualizeDesign.R
Given a sample table and a design formula, generate a collection of
static plots for exploring the resulting design matrix graphically.
This function is called internally by ExploreModelMatrix()
, but
can also be used directly if interactivity is not required.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | VisualizeDesign(
sampleData,
designFormula,
flipCoordFitted = FALSE,
flipCoordCoocc = FALSE,
textSizeFitted = 5,
textSizeCoocc = 5,
textSizeLabsFitted = 12,
textSizeLabsCoocc = 12,
lineWidthFitted = 25,
addColorFitted = TRUE,
colorPaletteFitted = scales::hue_pal(),
dropCols = NULL,
designMatrix = NULL
)
|
sampleData |
A |
designFormula |
A |
flipCoordFitted, flipCoordCoocc |
A |
textSizeFitted, textSizeCoocc |
A |
textSizeLabsFitted, textSizeLabsCoocc |
A |
lineWidthFitted |
A |
addColorFitted |
A |
colorPaletteFitted |
A |
dropCols |
A character vector with columns to drop from the design matrix, or NULL if no columns should be dropped. |
designMatrix |
A |
A list with the following elements:
sampledata
: A data.frame
, expanded from the input
sampleData
plotlist
: A list of plots, displaying the fitted values for
each combination of predictor values, in terms of the model coefficients.
designmatrix
: The design matrix, after removing any columns in
dropCols
pseudoinverse
: The pseudoinverse of the design matrix
vifs
: A data.frame
with calculated variance inflation
factors
colors
: A vector with colors to use for different model
coefficients
cooccurrenceplots
: A list of plots, displaying the
co-occurrence pattern for the predictors (i.e., the number of observations
for each combination of predictor values)
totnbrrows
: The total number of "rows" in the list of plots
of fiitted values. Useful for deciding the required size of the plot canvas.
Charlotte Soneson
1 2 3 4 5 | VisualizeDesign(
sampleData = data.frame(genotype = rep(c("A", "B"), each = 4),
treatment = rep(c("treated", "untreated"), 4)),
designFormula = ~genotype + treatment
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.