StatisticResults_PCA_mdatools Class
Source:R/class_StatisticResults_PCA_mdatools.R
StatisticResults_PCA_mdatools.RdThe StatisticResults_PCA_mdatools class is used to store results of PCA model created with the mdatools package.
Usage
StatisticResults_PCA_mdatools(model = list())
# S3 method for class 'StatisticResults_PCA_mdatools'
validate_object(x)
# S3 method for class 'StatisticResults_PCA_mdatools'
summary(object, ...)
# S3 method for class 'StatisticResults_PCA_mdatools'
get_model_data(x)
# S3 method for class 'StatisticResults_PCA_mdatools'
predict(x, data)
# S3 method for class 'StatisticResults_PCA_mdatools'
test(x, data)
# S3 method for class 'StatisticResults_PCA_mdatools'
plot_explained_variance(
x,
interactive = TRUE,
xLab = NULL,
yLab = NULL,
title = NULL,
showText = TRUE,
showLegend = TRUE
)
# S3 method for class 'StatisticResults_Model'
plot_cumulative_explained_variance(
x,
interactive = TRUE,
xLab = NULL,
yLab = NULL,
title = NULL,
showText = TRUE,
showLegend = TRUE
)
# S3 method for class 'StatisticResults_PCA_mdatools'
plot_scores(
x,
analyses = NULL,
interactive = TRUE,
pcs = 1:2,
title = NULL,
colorGroups = NULL,
showText = TRUE,
showLegend = TRUE,
colorBy = "results"
)
# S3 method for class 'StatisticResults_PCA_mdatools'
plot_loadings(
x,
interactive = TRUE,
pcs = 1:2,
colorKey = NULL,
title = NULL,
showText = TRUE,
showLegend = TRUE
)
# S3 method for class 'StatisticResults_PCA_mdatools'
plot_residuals(
x,
analyses = NULL,
interactive = TRUE,
xLab = NULL,
yLab = NULL,
title = NULL,
colorGroups = NULL,
showText = TRUE,
showLegend = TRUE,
colorBy = "results"
)
# S3 method for class 'StatisticResults_PCA_mdatools'
plot_residual_distance(x, ...)
# S3 method for class 'StatisticResults_PCA_mdatools'
plot_overview(x, ...)Arguments
- model
An object of class
pcafrom the mdatools package.- x
A StatisticResults_PCA_mdatools object.
- object
A StatisticResults_PCA_mdatools object.
- ...
Additional arguments passed to the plot function.
- data
A data frame containing the new data to test or predict.
- interactive
Logical (length 1). When
TRUE, the data is plotted interactively using plotly.- xLab
A string with the title for the x axis.
- yLab
A string with the title for the y axis.
- title
A string with the title.
- showText
Logical (length 1), set to
TRUEto show the text annotations.- showLegend
Logical (length 1). Set to
TRUEto show legend.- analyses
Character or numeric vector with names or indexes of analyses in the
Analysesobject.- pcs
A vector of integers specifying which principal components to plot (default is 1:2).
- colorGroups
A factor character vector with the color groups for the data.
- colorBy
A string defining how to legend the plot. Possible values are
analyses,targets(the default) orreplicates.- colorKey
A vector of colors to use for the loadings (optional).
Methods (by generic)
validate_object(StatisticResults_PCA_mdatools): Validate the object, returning NULL if valid.summary(StatisticResults_PCA_mdatools): Print a summary of the model.get_model_data(StatisticResults_PCA_mdatools): Get the model data as a list of data frames.predict(StatisticResults_PCA_mdatools): Predict new data using the PCA model.test(StatisticResults_PCA_mdatools): Test new data using the PCA model.plot_explained_variance(StatisticResults_PCA_mdatools): Plot the explained variance of the PCA model.plot_scores(StatisticResults_PCA_mdatools): Plot the scores of the PCA model.plot_loadings(StatisticResults_PCA_mdatools): Plot the loadings of the PCA model.plot_residuals(StatisticResults_PCA_mdatools): Plot the residuals of the PCA model.plot_residual_distance(StatisticResults_PCA_mdatools): Plot residual distances of the PCA model.plot_overview(StatisticResults_PCA_mdatools): Plot the explained variance of the PCA model.