diff --git a/DESCRIPTION b/DESCRIPTION
index dc01edb..748003c 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: ALASCA
Title: Assorted, Linear ASCA Functions
-Version: 1.0.17
+Version: 1.0.19
Authors@R:
person(given = "Anders H.",
family = "Jarmund",
@@ -15,7 +15,7 @@ Encoding: UTF-8
LazyData: true
ByteCompile: true
Roxygen: list(markdown = TRUE, r6 = TRUE)
-RoxygenNote: 7.1.2
+RoxygenNote: 7.3.2
Depends:
data.table
Imports:
diff --git a/NAMESPACE b/NAMESPACE
index 59904c6..8aa0a15 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -20,5 +20,6 @@ export(plot_covariate)
export(plot_covariates)
export(plot_mm)
export(plot_val)
+export(predict_scores)
export(save.AlascaModel)
export(screeplot)
diff --git a/NEWS.md b/NEWS.md
index 70c8266..f1d9189 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,13 @@
+# ALASCA 1.0.19
+
+* Bug fix: The prediction plots should now work for models with separated effects too
+
+# ALASCA 1.0.18
+
+* Replacing `aes_string()` due to changes in the `ggplot2` package
+* Moved `finalize()` from public to private re changes in the `R6` package
+* Bug fix: Plots all variables instead of subset
+
# ALASCA 1.0.17
* Minor bug fix related to 1.0.16
diff --git a/R/ALASCA.R b/R/ALASCA.R
index 7c6d3cb..22b48d4 100644
--- a/R/ALASCA.R
+++ b/R/ALASCA.R
@@ -1499,43 +1499,43 @@ plot_prediction <- function() {
if(self$model$validate) {
if (self$black_and_white) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "x_data",
- y = "pred",
- group = "group_data",
- linetype = "group_data",
- ymin = "low",
- ymax = "high"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["pred"]],
+ group = .data[["group_data"]],
+ linetype = .data[["group_data"]],
+ ymin = .data[["low"]],
+ ymax = .data[["high"]]))
} else {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "x_data",
- y = "pred",
- group = "group_data",
- color = "group_data",
- linetype = "group_data",
- ymin = "low",
- ymax = "high"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["pred"]],
+ group = .data[["group_data"]],
+ color = .data[["group_data"]],
+ linetype = .data[["group_data"]],
+ ymin = .data[["low"]],
+ ymax = .data[["high"]]))
}
g <- g + ggplot2::geom_pointrange(position = ggplot2::position_dodge(width = self$dodgewidth)) +
ggplot2::geom_line(position = ggplot2::position_dodge(width = self$dodgewidth))
if (self$ribbon && self$black_and_white) {
- g <- g + ggplot2::geom_ribbon(ggplot2::aes_string(fill = "group_data"),
+ g <- g + ggplot2::geom_ribbon(ggplot2::aes(fill = .data[["group_data"]]),
alpha = .1,
position = ggplot2::position_dodge(width = self$dodgewidth), color = NA
) + ggplot2::scale_fill_manual(values = self$get_plot_palette()) + ggplot2::labs(fill = self$group_label)
}
} else {
if (self$black_and_white) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "x_data",
- y = "pred",
- group = "group_data",
- linetype = "group_data"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["pred"]],
+ group = .data[["group_data"]],
+ linetype = .data[["group_data"]]))
} else {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "x_data",
- y = "pred",
- group = "group_data",
- color = "group_data",
- linetype = "group_data"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["pred"]],
+ group = .data[["group_data"]],
+ color = .data[["group_data"]],
+ linetype = .data[["group_data"]]))
}
g <- g + ggplot2::geom_point() + ggplot2::geom_line()
}
@@ -1692,7 +1692,7 @@ plot_effect <- function() {
}
} else {
# Return only a single effect/component
- gs <- self$plot_effect_score(effect_i = effect_i, component = component)
+ gs <- self$plot_effect_score(effect_i = effect_i, component = component)
gl <- self$plot_effect_loading(effect_i = effect_i, component = component)
if (is.null(self$loading_group_column)) {
ggpubr::ggarrange(gs, gl, widths = c(2,3), common.legend = TRUE, legend = "bottom", align = "h", labels = self$labels)
@@ -1729,48 +1729,48 @@ plot_effect_score <- function(effect_i = 1, component = 1) {
if (self$model$method == "LMM") {
if (self$black_and_white) {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = "score",
- group = "group_data",
- shape = "group_data",
- linetype = "group_data",
- ymin = "low",
- ymax = "high"))
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ group = .data[["group_data"]],
+ shape = .data[["group_data"]],
+ linetype = .data[["group_data"]],
+ ymin = .data[["low"]],
+ ymax = .data[["high"]]))
} else {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = "score",
- group = "group_data",
- color = "group_data",
- linetype = "group_data",
- ymin = "low",
- ymax = "high"))
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ group = .data[["group_data"]],
+ color = .data[["group_data"]],
+ linetype = .data[["group_data"]],
+ ymin = .data[["low"]],
+ ymax = .data[["high"]]))
}
g <- g + ggplot2::geom_line(position = ggplot2::position_dodge(width = self$dodgewidth))
} else {
if (self$black_and_white) {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = "score",
- shape = "group_data",
- ymin = "low",
- ymax = "high"))
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ shape = .data[["group_data"]],
+ ymin = .data[["low"]],
+ ymax = .data[["high"]]))
} else {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = "score",
- color = "group_data",
- ymin = "low",
- ymax = "high"))
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ color = .data[["group_data"]],
+ ymin = .data[["low"]],
+ ymax = .data[["high"]]))
}
}
g <- g + ggplot2::geom_pointrange(position = ggplot2::position_dodge(width = self$dodgewidth))
if (self$ribbon && !self$black_and_white && self$model$method == "LMM") {
- g <- g + ggplot2::geom_ribbon(ggplot2::aes_string(fill = "group_data"),
- alpha = .1,
+ g <- g + ggplot2::geom_ribbon(ggplot2::aes(fill = .data[["group_data"]]),
+ alpha = .1,
position = ggplot2::position_dodge(width = self$dodgewidth), color = NA
- ) + ggplot2::scale_fill_manual(values = self$get_plot_palette()) + ggplot2::labs(fill = self$group_label)
+ ) + ggplot2::scale_fill_manual(values = self$get_plot_palette()) + ggplot2::labs(fill = self$group_label)
}
} else {
@@ -1779,31 +1779,35 @@ plot_effect_score <- function(effect_i = 1, component = 1) {
if (self$model$method == "LMM") {
if (self$black_and_white) {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = "score",
- linetype = "group_data",
- group = "group_data",
- shape = "group_data"))
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ linetype = .data[["group_data"]],
+ group = .data[["group_data"]],
+ shape = .data[["group_data"]])
+ )
} else {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = "score",
- linetype = "group_data",
- group = "group_data",
- color = "group_data"))
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ linetype = .data[["group_data"]],
+ group = .data[["group_data"]],
+ color = .data[["group_data"]])
+ )
}
g <- g + ggplot2::geom_line()
} else {
if (self$black_and_white) {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = "score",
- shape = "group_data"))
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ shape = .data[["group_data"]])
+ )
} else {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = "score",
- color = "group_data"))
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ color = .data[["group_data"]])
+ )
}
}
g <- g + ggplot2::geom_point()
@@ -1859,15 +1863,15 @@ plot_effect_loading <- function(effect_i = 1, component = 1) {
# Validated model
if (is.null(self$loading_group_column)) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covars", y = "loading", ymin = "low", ymax = "high"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covars"]], y = .data[["loading"]], ymin = .data[["low"]], ymax = .data[["high"]]))
} else {
if (self$black_and_white) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covars", y = "loading", ymin = "low", ymax = "high", shape = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covars"]], y = .data[["loading"]], ymin = .data[["low"]], ymax = .data[["high"]], shape = .data[["covargroup"]]))
} else {
if (self$waterfall == TRUE) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covars", y = "loading", ymin = "low", ymax = "high", shape = "covargroup", fill = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covars"]], y = .data[["loading"]], ymin = .data[["low"]], ymax = .data[["high"]], shape = .data[["covargroup"]], fill = .data[["covargroup"]]))
} else {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covars", y = "loading", ymin = "low", ymax = "high", shape = "covargroup", color = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covars"]], y = .data[["loading"]], ymin = .data[["low"]], ymax = .data[["high"]], shape = .data[["covargroup"]], color = .data[["covargroup"]]))
}
}
}
@@ -1885,15 +1889,32 @@ plot_effect_loading <- function(effect_i = 1, component = 1) {
# Unvalidated model
if (is.null(self$loading_group_column)) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covars", y = "loading"))
+ g <- ggplot2::ggplot(data_to_plot,
+ ggplot2::aes(x = .data[["covars"]],
+ y = .data[["loading"]])
+ )
} else {
if (self$black_and_white) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covars", y = "loading", shape = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot,
+ ggplot2::aes(x = .data[["covars"]],
+ y = .data[["loading"]],
+ shape = .data[["covargroup"]])
+ )
} else {
if (self$waterfall == TRUE) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covars", y = "loading", shape = "covargroup", fill = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot,
+ ggplot2::aes(x = .data[["covars"]],
+ y = .data[["loading"]],
+ shape = .data[["covargroup"]],
+ fill = .data[["covargroup"]])
+ )
} else {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covars", y = "loading", shape = "covargroup", color = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot,
+ ggplot2::aes(x = .data[["covars"]],
+ y = .data[["loading"]],
+ shape = .data[["covargroup"]],
+ color = .data[["covargroup"]])
+ )
}
}
}
@@ -2043,11 +2064,12 @@ plot_effect_validation_score <- function(effect_i = 1, component = 1) {
# Validated model
g <- ggplot2::ggplot(data_to_plot[model != 0],
- ggplot2::aes_string(x = "x_data",
- y = "score",
- group = "grouping",
- color = "group_data",
- linetype = "group_data")) +
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[["score"]],
+ group = .data[["grouping"]],
+ color = .data[["group_data"]],
+ linetype = .data[["group_data"]])
+ ) +
ggplot2::geom_point(alpha = 0.5) +
ggplot2::geom_line(alpha = 0.5) +
ggplot2::geom_point(data = data_to_plot[model == 0], color = "black") +
@@ -2055,10 +2077,10 @@ plot_effect_validation_score <- function(effect_i = 1, component = 1) {
ggplot2::scale_alpha(range = c(0.1, 1), guide = "none") +
ggplot2::scale_color_manual(values = self$get_plot_palette()) +
ggplot2::scale_linetype_manual(values = self$get_plot_linetypes()) +
- ggplot2::labs(color = self$group_label,
+ ggplot2::labs(color = self$group_label,
linetype = self$group_label,
- x = self$x_label,
- y = self$get_explained_label(effect_i = effect_i, component = component, type= "Score")) +
+ x = self$x_label,
+ y = self$get_explained_label(effect_i = effect_i, component = component, type= "Score")) +
self$my_theme + self$xflip(flip = FALSE)
return(g)
}
@@ -2089,9 +2111,19 @@ plot_effect_validation_loading <- function(effect_i = 1, component = 1) {
data_to_plot[, nval := as.numeric(covars)]
if (is.null(self$loading_group_column)) {
- g <- ggplot2::ggplot(data_to_plot[model != 0], ggplot2::aes_string(x = "covars", y = "loading", group = "model"))
+ g <- ggplot2::ggplot(data_to_plot[model != 0],
+ ggplot2::aes(x = .data[["covars"]],
+ y = .data[["loading"]],
+ group = .data[["model"]])
+ )
} else {
- g <- ggplot2::ggplot(data_to_plot[model != 0], ggplot2::aes_string(x = "covars", y = "loading", group = "model", shape = "covargroup", color = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot[model != 0],
+ ggplot2::aes(x = .data[["covars"]],
+ y = .data[["loading"]],
+ group = .data[["model"]],
+ shape = .data[["covargroup"]],
+ color = .data[["covargroup"]])
+ )
}
g <- g + ggplot2::geom_hline(yintercept = 0, linetype = "dashed") +
@@ -2314,20 +2346,21 @@ plot_2D_score <- function() {
data_to_plot <- dcast(data = data_to_plot, ...~PC, value.var = "score")
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "PC_1",
- y = "PC_2",
- shape = "x_data",
- color = "group_data")) +
+ ggplot2::aes(x = .data[["PC_1"]],
+ y = .data[["PC_2"]],
+ shape = .data[["x_data"]],
+ color = .data[["group_data"]])
+ ) +
ggplot2::geom_point(alpha = 0.8) +
ggplot2::geom_line(ggplot2::aes(group = paste(group_data, model)), alpha = 0.3) +
ggplot2::stat_ellipse(ggplot2::aes(linetype = x_data)) +
ggplot2::scale_color_manual(values = self$get_plot_palette()) +
ggplot2::scale_alpha(range = c(0, 1)) +
- ggplot2::labs(color = self$group_label,
+ ggplot2::labs(color = self$group_label,
linetype = self$x_label,
- shape = self$x_label,
- x = self$get_explained_label(effect_i = self$effect_i, component = self$component[[1]], type= "Score"),
- y = self$get_explained_label(effect_i = self$effect_i, component = self$component[[2]], type= "Score")) +
+ shape = self$x_label,
+ x = self$get_explained_label(effect_i = self$effect_i, component = self$component[[1]], type= "Score"),
+ y = self$get_explained_label(effect_i = self$effect_i, component = self$component[[2]], type= "Score")) +
self$my_theme
}
@@ -2512,18 +2545,20 @@ plot_participants <- function(effect_i = 1, component = 1) {
if(self$model$method == "LMM") {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = self$model$formula$lhs,
- group = self$model$formula$ID,
- color = "group_data",
- linetype = "group_data")) +
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[[self$model$formula$lhs]],
+ group = .data[[self$model$formula$ID]],
+ color = .data[["group_data"]],
+ linetype = .data[["group_data"]])
+ ) +
ggplot2::geom_point(position = ggplot2::position_dodge(width = self$dodgewidth)) +
ggplot2::geom_line(position = ggplot2::position_dodge(width = self$dodgewidth))
} else {
g <- ggplot2::ggplot(data_to_plot,
- ggplot2::aes_string(x = "x_data",
- y = self$model$formula$lhs,
- color = "group_data")) +
+ ggplot2::aes(x = .data[["x_data"]],
+ y = .data[[self$model$formula$lhs]],
+ color = .data[["group_data"]])
+ ) +
ggplot2::geom_point(position = ggplot2::position_dodge(width = self$dodgewidth))
}
g <- g + ggplot2::scale_color_manual(values = self$get_plot_palette()) +
diff --git a/R/AlascaModel.R b/R/AlascaModel.R
index 848c960..0cd4430 100644
--- a/R/AlascaModel.R
+++ b/R/AlascaModel.R
@@ -19,9 +19,9 @@ AlascaModel <- R6::R6Class("AlascaModel",
#' @field ignore_missing_covars If TRUE, ignore missing covariate values
ignore_missing_covars = FALSE,
#' @field version Version number
- version = "1.0.17",
+ version = "1.0.19",
#' @field update_date Date of latest update
- update_date = "2024-09-13",
+ update_date = "2026-01-16",
# Effect matrices
#' @field separate_effects If TRUE, try to separate the effects
@@ -256,15 +256,6 @@ AlascaModel <- R6::R6Class("AlascaModel",
# Build the ALASCA model ----
self$build_model()
},
- finalize = function() {
- if (self$save_to_disk && !self$minimize_object) {
- if (self$db_method == "SQLite") {
- DBI::dbDisconnect(self$db_con)
- } else {
- DBI::dbDisconnect(self$db_con, shutdown = TRUE)
- }
- }
- },
#' @description
#' Update the current model (used for validation)
update = function() {
@@ -446,7 +437,7 @@ AlascaModel <- R6::R6Class("AlascaModel",
if (self$equal_baseline) {
# Must add baselines for missing interactions (baseline x group)
- baseline_to_add <- self$model_prediction[get(self$effect_terms) %in% self$get_ref(self$effect_terms)]
+ baseline_to_add <- self$model_prediction[self$get_ref(self$effect_terms)]
if (length(self$effect_terms) == 2) {
# In this case, there are no main effects except time
@@ -844,5 +835,15 @@ AlascaModel <- R6::R6Class("AlascaModel",
unique(unlist(self$effect_list$terms))
}
),
- private = list()
+ private = list(
+ finalize = function() {
+ if (self$save_to_disk && !self$minimize_object) {
+ if (self$db_method == "SQLite") {
+ DBI::dbDisconnect(self$db_con)
+ } else {
+ DBI::dbDisconnect(self$db_con, shutdown = TRUE)
+ }
+ }
+ }
+ )
)
diff --git a/R/AlascaPlot.R b/R/AlascaPlot.R
index 6a77178..5307be2 100644
--- a/R/AlascaPlot.R
+++ b/R/AlascaPlot.R
@@ -85,8 +85,7 @@ AlascaPlot <- R6::R6Class("AlascaPlot",
#' @field type Plot type
type = "effect",
initialize = function(model) {
- self$model <- model
- self$n_limit <- min(self$n_limit / 2, floor(length(self$model$get_levels("variable")) / 2))
+ self$model <- model
},
call_plot = function(...) {
inputs <- list(...)
@@ -253,10 +252,10 @@ AlascaPlot <- R6::R6Class("AlascaPlot",
if (is.null(self$loading_group_column)) {
if (self$model$validate) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covar", y = "estimate", ymin = "low", ymax = "high")) +
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covar"]], y = .data[["estimate"]], ymin = .data[["low"]], ymax = .data[["high"]])) +
ggplot2::geom_pointrange()
} else {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covar", y = "estimate")) +
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covar"]], y = .data[["estimate"]])) +
ggplot2::geom_point()
}
} else {
@@ -266,16 +265,16 @@ AlascaPlot <- R6::R6Class("AlascaPlot",
}
if (self$model$validate) {
if (self$black_and_white) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covar", y = "estimate", ymin = "low", ymax = "high", shape = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covar"]], y = .data[["estimate"]], ymin = .data[["low"]], ymax = .data[["high"]], shape = .data[["covargroup"]]))
} else {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covar", y = "estimate", ymin = "low", ymax = "high", shape = "covargroup", color = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covar"]], y = .data[["estimate"]], ymin = .data[["low"]], ymax = .data[["high"]], shape = .data[["covargroup"]], color = .data[["covargroup"]]))
}
g <- g + ggplot2::geom_pointrange()
} else {
if (self$black_and_white) {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covar", y = "estimate", shape = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covar"]], y = .data[["estimate"]], shape = .data[["covargroup"]]))
} else {
- g <- ggplot2::ggplot(data_to_plot, ggplot2::aes_string(x = "covar", y = "estimate", shape = "covargroup", color = "covargroup"))
+ g <- ggplot2::ggplot(data_to_plot, ggplot2::aes(x = .data[["covar"]], y = .data[["estimate"]], shape = .data[["covargroup"]], color = .data[["covargroup"]]))
}
g <- g + ggplot2::geom_point()
diff --git a/man/AlascaModel.Rd b/man/AlascaModel.Rd
index 21f18a0..b52efe5 100644
--- a/man/AlascaModel.Rd
+++ b/man/AlascaModel.Rd
@@ -41,6 +41,8 @@ The object builds the ALASCA model and contains the data
\item{\code{optimize_score}}{If TRUE, test all combinations of signs for the most important loadings, and choose the combination being the best fit}
+\item{\code{optimize_PCs}}{If TRUE, test if principal components have to be re-ordered during validation}
+
\item{\code{validate}}{If TRUE, validate the model}
\item{\code{validate_regression}}{If TRUE, validate get marginal means}
@@ -111,59 +113,60 @@ The object builds the ALASCA model and contains the data
\section{Methods}{
\subsection{Public methods}{
\itemize{
-\item \href{#method-remove_embedded_data}{\code{AlascaModel$remove_embedded_data()}}
-\item \href{#method-get_default_scaling_function}{\code{AlascaModel$get_default_scaling_function()}}
-\item \href{#method-get_scaling_function}{\code{AlascaModel$get_scaling_function()}}
-\item \href{#method-get_pca_function}{\code{AlascaModel$get_pca_function()}}
-\item \href{#method-build_model}{\code{AlascaModel$build_model()}}
-\item \href{#method-run_regression}{\code{AlascaModel$run_regression()}}
-\item \href{#method-get_regression_coefficients}{\code{AlascaModel$get_regression_coefficients()}}
-\item \href{#method-remove_covars}{\code{AlascaModel$remove_covars()}}
-\item \href{#method-get_effect_matrix}{\code{AlascaModel$get_effect_matrix()}}
-\item \href{#method-do_pca}{\code{AlascaModel$do_pca()}}
-\item \href{#method-do_reduce_dimensions}{\code{AlascaModel$do_reduce_dimensions()}}
-\item \href{#method-clean_pca}{\code{AlascaModel$clean_pca()}}
-\item \href{#method-clean_alasca}{\code{AlascaModel$clean_alasca()}}
-\item \href{#method-do_validate}{\code{AlascaModel$do_validate()}}
-\item \href{#method-get_validation_percentiles}{\code{AlascaModel$get_validation_percentiles()}}
-\item \href{#method-get_validation_percentiles_regression}{\code{AlascaModel$get_validation_percentiles_regression()}}
-\item \href{#method-get_validation_percentiles_covars}{\code{AlascaModel$get_validation_percentiles_covars()}}
-\item \href{#method-get_validation_percentiles_loading}{\code{AlascaModel$get_validation_percentiles_loading()}}
-\item \href{#method-get_validation_scores}{\code{AlascaModel$get_validation_scores()}}
-\item \href{#method-get_validation_loadings}{\code{AlascaModel$get_validation_loadings()}}
-\item \href{#method-get_validation_percentiles_score}{\code{AlascaModel$get_validation_percentiles_score()}}
-\item \href{#method-get_regression_predictions}{\code{AlascaModel$get_regression_predictions()}}
-\item \href{#method-get_validation_ids}{\code{AlascaModel$get_validation_ids()}}
-\item \href{#method-prepare_validation_run}{\code{AlascaModel$prepare_validation_run()}}
-\item \href{#method-get_bootstrap_data}{\code{AlascaModel$get_bootstrap_data()}}
-\item \href{#method-new}{\code{AlascaModel$new()}}
-\item \href{#method-finalize}{\code{AlascaModel$finalize()}}
-\item \href{#method-update}{\code{AlascaModel$update()}}
-\item \href{#method-log}{\code{AlascaModel$log()}}
-\item \href{#method-plot}{\code{AlascaModel$plot()}}
-\item \href{#method-get_residuals}{\code{AlascaModel$get_residuals()}}
-\item \href{#method-set_effect_terms}{\code{AlascaModel$set_effect_terms()}}
-\item \href{#method-set_design_matrices}{\code{AlascaModel$set_design_matrices()}}
-\item \href{#method-flip}{\code{AlascaModel$flip()}}
-\item \href{#method-get_ref}{\code{AlascaModel$get_ref()}}
-\item \href{#method-get_levels}{\code{AlascaModel$get_levels()}}
-\item \href{#method-get_PCs}{\code{AlascaModel$get_PCs()}}
-\item \href{#method-get_predictions}{\code{AlascaModel$get_predictions()}}
-\item \href{#method-get_scores}{\code{AlascaModel$get_scores()}}
-\item \href{#method-get_loadings}{\code{AlascaModel$get_loadings()}}
-\item \href{#method-get_covars}{\code{AlascaModel$get_covars()}}
-\item \href{#method-print_version}{\code{AlascaModel$print_version()}}
-\item \href{#method-save_validation}{\code{AlascaModel$save_validation()}}
-\item \href{#method-save_to_csv}{\code{AlascaModel$save_to_csv()}}
-\item \href{#method-save_model}{\code{AlascaModel$save_model()}}
-\item \href{#method-rotate_matrix_optimize_score}{\code{AlascaModel$rotate_matrix_optimize_score()}}
-\item \href{#method-rotate_matrix}{\code{AlascaModel$rotate_matrix()}}
-\item \href{#method-clone}{\code{AlascaModel$clone()}}
-}
-}
-\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-remove_embedded_data}{}}}
+\item \href{#method-AlascaModel-remove_embedded_data}{\code{AlascaModel$remove_embedded_data()}}
+\item \href{#method-AlascaModel-get_default_scaling_function}{\code{AlascaModel$get_default_scaling_function()}}
+\item \href{#method-AlascaModel-get_scaling_function}{\code{AlascaModel$get_scaling_function()}}
+\item \href{#method-AlascaModel-get_pca_function}{\code{AlascaModel$get_pca_function()}}
+\item \href{#method-AlascaModel-build_model}{\code{AlascaModel$build_model()}}
+\item \href{#method-AlascaModel-run_regression}{\code{AlascaModel$run_regression()}}
+\item \href{#method-AlascaModel-get_regression_coefficients}{\code{AlascaModel$get_regression_coefficients()}}
+\item \href{#method-AlascaModel-remove_covars}{\code{AlascaModel$remove_covars()}}
+\item \href{#method-AlascaModel-get_effect_matrix}{\code{AlascaModel$get_effect_matrix()}}
+\item \href{#method-AlascaModel-do_pca}{\code{AlascaModel$do_pca()}}
+\item \href{#method-AlascaModel-do_reduce_dimensions}{\code{AlascaModel$do_reduce_dimensions()}}
+\item \href{#method-AlascaModel-clean_pca}{\code{AlascaModel$clean_pca()}}
+\item \href{#method-AlascaModel-clean_alasca}{\code{AlascaModel$clean_alasca()}}
+\item \href{#method-AlascaModel-do_validate}{\code{AlascaModel$do_validate()}}
+\item \href{#method-AlascaModel-get_validation_percentiles}{\code{AlascaModel$get_validation_percentiles()}}
+\item \href{#method-AlascaModel-get_validation_percentiles_regression}{\code{AlascaModel$get_validation_percentiles_regression()}}
+\item \href{#method-AlascaModel-get_validation_percentiles_covars}{\code{AlascaModel$get_validation_percentiles_covars()}}
+\item \href{#method-AlascaModel-get_validation_percentiles_loading}{\code{AlascaModel$get_validation_percentiles_loading()}}
+\item \href{#method-AlascaModel-get_validation_scores}{\code{AlascaModel$get_validation_scores()}}
+\item \href{#method-AlascaModel-get_validation_loadings}{\code{AlascaModel$get_validation_loadings()}}
+\item \href{#method-AlascaModel-get_validation_percentiles_score}{\code{AlascaModel$get_validation_percentiles_score()}}
+\item \href{#method-AlascaModel-get_regression_predictions}{\code{AlascaModel$get_regression_predictions()}}
+\item \href{#method-AlascaModel-get_validation_ids}{\code{AlascaModel$get_validation_ids()}}
+\item \href{#method-AlascaModel-prepare_validation_run}{\code{AlascaModel$prepare_validation_run()}}
+\item \href{#method-AlascaModel-get_bootstrap_data}{\code{AlascaModel$get_bootstrap_data()}}
+\item \href{#method-AlascaModel-predict_scores}{\code{AlascaModel$predict_scores()}}
+\item \href{#method-AlascaModel-new}{\code{AlascaModel$new()}}
+\item \href{#method-AlascaModel-update}{\code{AlascaModel$update()}}
+\item \href{#method-AlascaModel-log}{\code{AlascaModel$log()}}
+\item \href{#method-AlascaModel-plot}{\code{AlascaModel$plot()}}
+\item \href{#method-AlascaModel-get_residuals}{\code{AlascaModel$get_residuals()}}
+\item \href{#method-AlascaModel-set_effect_terms}{\code{AlascaModel$set_effect_terms()}}
+\item \href{#method-AlascaModel-set_design_matrices}{\code{AlascaModel$set_design_matrices()}}
+\item \href{#method-AlascaModel-flip}{\code{AlascaModel$flip()}}
+\item \href{#method-AlascaModel-get_ref}{\code{AlascaModel$get_ref()}}
+\item \href{#method-AlascaModel-get_levels}{\code{AlascaModel$get_levels()}}
+\item \href{#method-AlascaModel-get_PCs}{\code{AlascaModel$get_PCs()}}
+\item \href{#method-AlascaModel-get_predictions}{\code{AlascaModel$get_predictions()}}
+\item \href{#method-AlascaModel-get_scores}{\code{AlascaModel$get_scores()}}
+\item \href{#method-AlascaModel-get_loadings}{\code{AlascaModel$get_loadings()}}
+\item \href{#method-AlascaModel-get_covars}{\code{AlascaModel$get_covars()}}
+\item \href{#method-AlascaModel-print_version}{\code{AlascaModel$print_version()}}
+\item \href{#method-AlascaModel-save_validation}{\code{AlascaModel$save_validation()}}
+\item \href{#method-AlascaModel-save_to_csv}{\code{AlascaModel$save_to_csv()}}
+\item \href{#method-AlascaModel-save_model}{\code{AlascaModel$save_model()}}
+\item \href{#method-AlascaModel-rotate_matrix_optimize_score}{\code{AlascaModel$rotate_matrix_optimize_score()}}
+\item \href{#method-AlascaModel-optimize_components}{\code{AlascaModel$optimize_components()}}
+\item \href{#method-AlascaModel-rotate_matrix}{\code{AlascaModel$rotate_matrix()}}
+\item \href{#method-AlascaModel-clone}{\code{AlascaModel$clone()}}
+}
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-remove_embedded_data}{}}}
\subsection{Method \code{remove_embedded_data()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$remove_embedded_data()}\if{html}{\out{
}}
@@ -171,8 +174,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_default_scaling_function}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_default_scaling_function}{}}}
\subsection{Method \code{get_default_scaling_function()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_default_scaling_function()}\if{html}{\out{
}}
@@ -180,8 +183,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_scaling_function}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_scaling_function}{}}}
\subsection{Method \code{get_scaling_function()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_scaling_function()}\if{html}{\out{
}}
@@ -189,8 +192,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_pca_function}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_pca_function}{}}}
\subsection{Method \code{get_pca_function()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_pca_function()}\if{html}{\out{
}}
@@ -198,8 +201,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-build_model}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-build_model}{}}}
\subsection{Method \code{build_model()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$build_model()}\if{html}{\out{
}}
@@ -207,8 +210,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-run_regression}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-run_regression}{}}}
\subsection{Method \code{run_regression()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$run_regression()}\if{html}{\out{
}}
@@ -216,8 +219,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_regression_coefficients}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_regression_coefficients}{}}}
\subsection{Method \code{get_regression_coefficients()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_regression_coefficients()}\if{html}{\out{
}}
@@ -225,8 +228,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-remove_covars}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-remove_covars}{}}}
\subsection{Method \code{remove_covars()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$remove_covars()}\if{html}{\out{
}}
@@ -234,8 +237,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_effect_matrix}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_effect_matrix}{}}}
\subsection{Method \code{get_effect_matrix()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_effect_matrix()}\if{html}{\out{
}}
@@ -243,8 +246,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-do_pca}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-do_pca}{}}}
\subsection{Method \code{do_pca()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$do_pca()}\if{html}{\out{
}}
@@ -252,8 +255,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-do_reduce_dimensions}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-do_reduce_dimensions}{}}}
\subsection{Method \code{do_reduce_dimensions()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$do_reduce_dimensions()}\if{html}{\out{
}}
@@ -261,8 +264,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-clean_pca}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-clean_pca}{}}}
\subsection{Method \code{clean_pca()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$clean_pca()}\if{html}{\out{
}}
@@ -270,8 +273,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-clean_alasca}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-clean_alasca}{}}}
\subsection{Method \code{clean_alasca()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$clean_alasca()}\if{html}{\out{
}}
@@ -279,8 +282,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-do_validate}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-do_validate}{}}}
\subsection{Method \code{do_validate()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$do_validate()}\if{html}{\out{
}}
@@ -288,8 +291,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_validation_percentiles}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_validation_percentiles}{}}}
\subsection{Method \code{get_validation_percentiles()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_validation_percentiles(objectlist)}\if{html}{\out{
}}
@@ -297,8 +300,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_validation_percentiles_regression}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_validation_percentiles_regression}{}}}
\subsection{Method \code{get_validation_percentiles_regression()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_validation_percentiles_regression(objectlist)}\if{html}{\out{
}}
@@ -306,8 +309,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_validation_percentiles_covars}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_validation_percentiles_covars}{}}}
\subsection{Method \code{get_validation_percentiles_covars()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_validation_percentiles_covars(objectlist)}\if{html}{\out{
}}
@@ -315,8 +318,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_validation_percentiles_loading}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_validation_percentiles_loading}{}}}
\subsection{Method \code{get_validation_percentiles_loading()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_validation_percentiles_loading(objectlist)}\if{html}{\out{
}}
@@ -324,8 +327,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_validation_scores}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_validation_scores}{}}}
\subsection{Method \code{get_validation_scores()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_validation_scores(objectlist = NULL, effect_i = 1)}\if{html}{\out{
}}
@@ -333,8 +336,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_validation_loadings}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_validation_loadings}{}}}
\subsection{Method \code{get_validation_loadings()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_validation_loadings(objectlist = NULL, effect_i = 1)}\if{html}{\out{
}}
@@ -342,8 +345,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_validation_percentiles_score}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_validation_percentiles_score}{}}}
\subsection{Method \code{get_validation_percentiles_score()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_validation_percentiles_score(objectlist)}\if{html}{\out{
}}
@@ -351,8 +354,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_regression_predictions}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_regression_predictions}{}}}
\subsection{Method \code{get_regression_predictions()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_regression_predictions()}\if{html}{\out{
}}
@@ -360,8 +363,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_validation_ids}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_validation_ids}{}}}
\subsection{Method \code{get_validation_ids()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_validation_ids()}\if{html}{\out{
}}
@@ -369,8 +372,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-prepare_validation_run}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-prepare_validation_run}{}}}
\subsection{Method \code{prepare_validation_run()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$prepare_validation_run(runN)}\if{html}{\out{
}}
@@ -378,8 +381,8 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_bootstrap_data}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_bootstrap_data}{}}}
\subsection{Method \code{get_bootstrap_data()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_bootstrap_data(df_raw, participants_in_bootstrap, modmat)}\if{html}{\out{
}}
@@ -387,26 +390,26 @@ The object builds the ALASCA model and contains the data
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-new}{}}}
-\subsection{Method \code{new()}}{
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-predict_scores}{}}}
+\subsection{Method \code{predict_scores()}}{
\subsection{Usage}{
-\if{html}{\out{}}\preformatted{AlascaModel$new(df, formula, effects, ...)}\if{html}{\out{
}}
+\if{html}{\out{}}\preformatted{AlascaModel$predict_scores(data, effect_i = 1, component = 1)}\if{html}{\out{
}}
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-finalize}{}}}
-\subsection{Method \code{finalize()}}{
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-new}{}}}
+\subsection{Method \code{new()}}{
\subsection{Usage}{
-\if{html}{\out{}}\preformatted{AlascaModel$finalize()}\if{html}{\out{
}}
+\if{html}{\out{}}\preformatted{AlascaModel$new(df, formula, effects, ...)}\if{html}{\out{
}}
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-update}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-update}{}}}
\subsection{Method \code{update()}}{
Update the current model (used for validation)
\subsection{Usage}{
@@ -415,8 +418,8 @@ Update the current model (used for validation)
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-log}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-log}{}}}
\subsection{Method \code{log()}}{
Function for logging messages using the log4r package
\subsection{Usage}{
@@ -434,8 +437,8 @@ Function for logging messages using the log4r package
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-plot}{}}}
\subsection{Method \code{plot()}}{
Main function for plots
\subsection{Usage}{
@@ -453,18 +456,19 @@ Main function for plots
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_residuals}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_residuals}{}}}
\subsection{Method \code{get_residuals()}}{
Resample participants for validation
+TODO: There is a bug when the order of the terms in \code{self$effect_list$expr} differs from \code{t1:t2:t3} in a three-way interaction
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_residuals(variable = NULL)}\if{html}{\out{
}}
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-set_effect_terms}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-set_effect_terms}{}}}
\subsection{Method \code{set_effect_terms()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$set_effect_terms()}\if{html}{\out{
}}
@@ -472,8 +476,8 @@ Resample participants for validation
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-set_design_matrices}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-set_design_matrices}{}}}
\subsection{Method \code{set_design_matrices()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$set_design_matrices()}\if{html}{\out{
}}
@@ -481,8 +485,8 @@ Resample participants for validation
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-flip}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-flip}{}}}
\subsection{Method \code{flip()}}{
Switch the sign of scores and loadings
\subsection{Usage}{
@@ -500,8 +504,8 @@ Switch the sign of scores and loadings
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_ref}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_ref}{}}}
\subsection{Method \code{get_ref()}}{
Returns the reference level of a given column
\subsection{Usage}{
@@ -520,8 +524,8 @@ The reference level
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_levels}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_levels}{}}}
\subsection{Method \code{get_levels()}}{
Returns all the levels of a given column
\subsection{Usage}{
@@ -542,8 +546,8 @@ A vector with factor levels
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_PCs}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_PCs}{}}}
\subsection{Method \code{get_PCs()}}{
Returns the most interesting principal components (i.e., components explaining more than a given limit of variance: \code{explanatory_limit})
\subsection{Usage}{
@@ -562,8 +566,8 @@ A vector with principal components
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_predictions}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_predictions}{}}}
\subsection{Method \code{get_predictions()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_predictions()}\if{html}{\out{
}}
@@ -571,8 +575,8 @@ A vector with principal components
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_scores}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_scores}{}}}
\subsection{Method \code{get_scores()}}{
Return scores
\subsection{Usage}{
@@ -590,8 +594,8 @@ Return scores
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_loadings}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_loadings}{}}}
\subsection{Method \code{get_loadings()}}{
Return loadings
\subsection{Usage}{
@@ -611,8 +615,8 @@ Return loadings
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_covars}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-get_covars}{}}}
\subsection{Method \code{get_covars()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaModel$get_covars(n_limit = 0)}\if{html}{\out{
}}
@@ -627,8 +631,8 @@ Return loadings
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-print_version}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-print_version}{}}}
\subsection{Method \code{print_version()}}{
Print ALASCA version
\subsection{Usage}{
@@ -640,8 +644,8 @@ String with version number and date of latest update
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-save_validation}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-save_validation}{}}}
\subsection{Method \code{save_validation()}}{
Write scores, loadings, covars and predictions from validation run to database and remove data from memory
\subsection{Usage}{
@@ -657,8 +661,8 @@ Write scores, loadings, covars and predictions from validation run to database a
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-save_to_csv}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-save_to_csv}{}}}
\subsection{Method \code{save_to_csv()}}{
Save scores, loading, covars, and predictions to csv files
\subsection{Usage}{
@@ -667,8 +671,8 @@ Save scores, loading, covars, and predictions to csv files
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-save_model}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-save_model}{}}}
\subsection{Method \code{save_model()}}{
Save model to RDS and scores, loading, covars, and predictions to csv files
\subsection{Usage}{
@@ -677,8 +681,8 @@ Save model to RDS and scores, loading, covars, and predictions to csv files
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-rotate_matrix_optimize_score}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-rotate_matrix_optimize_score}{}}}
\subsection{Method \code{rotate_matrix_optimize_score()}}{
Rotate model loadings and scores with procrustes. This function checks all combinations of signs to minimize variation
\subsection{Usage}{
@@ -694,8 +698,25 @@ Rotate model loadings and scores with procrustes. This function checks all combi
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-rotate_matrix}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-optimize_components}{}}}
+\subsection{Method \code{optimize_components()}}{
+Check if components have to be re-ordered to better match the target
+\subsection{Usage}{
+\if{html}{\out{}}\preformatted{AlascaModel$optimize_components(target)}\if{html}{\out{
}}
+}
+
+\subsection{Arguments}{
+\if{html}{\out{}}
+\describe{
+\item{\code{target}}{Compare components of the model (\code{self}) with this as target}
+}
+\if{html}{\out{
}}
+}
+}
+\if{html}{\out{
}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-rotate_matrix}{}}}
\subsection{Method \code{rotate_matrix()}}{
Rotate model loadings and scores with procrustes
\subsection{Usage}{
@@ -711,8 +732,8 @@ Rotate model loadings and scores with procrustes
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-clone}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaModel-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
diff --git a/man/AlascaPlot.Rd b/man/AlascaPlot.Rd
index e547fab..805f36f 100644
--- a/man/AlascaPlot.Rd
+++ b/man/AlascaPlot.Rd
@@ -25,6 +25,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
\item{\code{n_bins}}{Number of bins for histograms}
+\item{\code{sort_loadings}}{String: loading, alpha, vector}
+
\item{\code{ribbon}}{Boolean. Plot ribbons for uncertainties}
\item{\code{bw}}{Boolean. Plot in gray scale}
@@ -47,7 +49,7 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
\item{\code{sort_by_loading_group}}{Boolean. Sort loadings within loading group}
-\item{\code{palette_end}}{Improve contrast by not using the full color space. See \code{\link[scales:viridis_pal]{scales::viridis_pal()}}}
+\item{\code{palette_end}}{Improve contrast by not using the full color space. See \code{\link[scales:pal_viridis]{scales::viridis_pal()}}}
\item{\code{effect_i}}{Effect(s) to plot}
@@ -72,42 +74,42 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
\section{Methods}{
\subsection{Public methods}{
\itemize{
-\item \href{#method-plot_prediction}{\code{AlascaPlot$plot_prediction()}}
-\item \href{#method-plot_effect}{\code{AlascaPlot$plot_effect()}}
-\item \href{#method-plot_effect_score}{\code{AlascaPlot$plot_effect_score()}}
-\item \href{#method-plot_effect_loading}{\code{AlascaPlot$plot_effect_loading()}}
-\item \href{#method-plot_effect_validation}{\code{AlascaPlot$plot_effect_validation()}}
-\item \href{#method-plot_effect_validation_score}{\code{AlascaPlot$plot_effect_validation_score()}}
-\item \href{#method-plot_effect_validation_loading}{\code{AlascaPlot$plot_effect_validation_loading()}}
-\item \href{#method-plot_2D_advanced}{\code{AlascaPlot$plot_2D_advanced()}}
-\item \href{#method-plot_2D}{\code{AlascaPlot$plot_2D()}}
-\item \href{#method-plot_2D_score}{\code{AlascaPlot$plot_2D_score()}}
-\item \href{#method-plot_2D_loading_1}{\code{AlascaPlot$plot_2D_loading_1()}}
-\item \href{#method-plot_2D_loading_2}{\code{AlascaPlot$plot_2D_loading_2()}}
-\item \href{#method-plot_histogram_score}{\code{AlascaPlot$plot_histogram_score()}}
-\item \href{#method-plot_histogram_loading}{\code{AlascaPlot$plot_histogram_loading()}}
-\item \href{#method-plot_histogram}{\code{AlascaPlot$plot_histogram()}}
-\item \href{#method-plot_participants}{\code{AlascaPlot$plot_participants()}}
-\item \href{#method-new}{\code{AlascaPlot$new()}}
-\item \href{#method-call_plot}{\code{AlascaPlot$call_plot()}}
-\item \href{#method-plot_scree}{\code{AlascaPlot$plot_scree()}}
-\item \href{#method-plot_residuals}{\code{AlascaPlot$plot_residuals()}}
-\item \href{#method-plot_covars}{\code{AlascaPlot$plot_covars()}}
-\item \href{#method-capitalize}{\code{AlascaPlot$capitalize()}}
-\item \href{#method-prettify_covar}{\code{AlascaPlot$prettify_covar()}}
-\item \href{#method-get_plot_linetypes}{\code{AlascaPlot$get_plot_linetypes()}}
-\item \href{#method-get_plot_shapes}{\code{AlascaPlot$get_plot_shapes()}}
-\item \href{#method-get_plot_palette}{\code{AlascaPlot$get_plot_palette()}}
-\item \href{#method-get_explained_label}{\code{AlascaPlot$get_explained_label()}}
-\item \href{#method-get_levels}{\code{AlascaPlot$get_levels()}}
-\item \href{#method-get_ref}{\code{AlascaPlot$get_ref()}}
-\item \href{#method-xflip}{\code{AlascaPlot$xflip()}}
-\item \href{#method-clone}{\code{AlascaPlot$clone()}}
+\item \href{#method-AlascaPlot-plot_prediction}{\code{AlascaPlot$plot_prediction()}}
+\item \href{#method-AlascaPlot-plot_effect}{\code{AlascaPlot$plot_effect()}}
+\item \href{#method-AlascaPlot-plot_effect_score}{\code{AlascaPlot$plot_effect_score()}}
+\item \href{#method-AlascaPlot-plot_effect_loading}{\code{AlascaPlot$plot_effect_loading()}}
+\item \href{#method-AlascaPlot-plot_effect_validation}{\code{AlascaPlot$plot_effect_validation()}}
+\item \href{#method-AlascaPlot-plot_effect_validation_score}{\code{AlascaPlot$plot_effect_validation_score()}}
+\item \href{#method-AlascaPlot-plot_effect_validation_loading}{\code{AlascaPlot$plot_effect_validation_loading()}}
+\item \href{#method-AlascaPlot-plot_2D_advanced}{\code{AlascaPlot$plot_2D_advanced()}}
+\item \href{#method-AlascaPlot-plot_2D}{\code{AlascaPlot$plot_2D()}}
+\item \href{#method-AlascaPlot-plot_2D_score}{\code{AlascaPlot$plot_2D_score()}}
+\item \href{#method-AlascaPlot-plot_2D_loading_1}{\code{AlascaPlot$plot_2D_loading_1()}}
+\item \href{#method-AlascaPlot-plot_2D_loading_2}{\code{AlascaPlot$plot_2D_loading_2()}}
+\item \href{#method-AlascaPlot-plot_histogram_score}{\code{AlascaPlot$plot_histogram_score()}}
+\item \href{#method-AlascaPlot-plot_histogram_loading}{\code{AlascaPlot$plot_histogram_loading()}}
+\item \href{#method-AlascaPlot-plot_histogram}{\code{AlascaPlot$plot_histogram()}}
+\item \href{#method-AlascaPlot-plot_participants}{\code{AlascaPlot$plot_participants()}}
+\item \href{#method-AlascaPlot-new}{\code{AlascaPlot$new()}}
+\item \href{#method-AlascaPlot-call_plot}{\code{AlascaPlot$call_plot()}}
+\item \href{#method-AlascaPlot-plot_scree}{\code{AlascaPlot$plot_scree()}}
+\item \href{#method-AlascaPlot-plot_residuals}{\code{AlascaPlot$plot_residuals()}}
+\item \href{#method-AlascaPlot-plot_covars}{\code{AlascaPlot$plot_covars()}}
+\item \href{#method-AlascaPlot-capitalize}{\code{AlascaPlot$capitalize()}}
+\item \href{#method-AlascaPlot-prettify_covar}{\code{AlascaPlot$prettify_covar()}}
+\item \href{#method-AlascaPlot-get_plot_linetypes}{\code{AlascaPlot$get_plot_linetypes()}}
+\item \href{#method-AlascaPlot-get_plot_shapes}{\code{AlascaPlot$get_plot_shapes()}}
+\item \href{#method-AlascaPlot-get_plot_palette}{\code{AlascaPlot$get_plot_palette()}}
+\item \href{#method-AlascaPlot-get_explained_label}{\code{AlascaPlot$get_explained_label()}}
+\item \href{#method-AlascaPlot-get_levels}{\code{AlascaPlot$get_levels()}}
+\item \href{#method-AlascaPlot-get_ref}{\code{AlascaPlot$get_ref()}}
+\item \href{#method-AlascaPlot-xflip}{\code{AlascaPlot$xflip()}}
+\item \href{#method-AlascaPlot-clone}{\code{AlascaPlot$clone()}}
}
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_prediction}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_prediction}{}}}
\subsection{Method \code{plot_prediction()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_prediction()}\if{html}{\out{
}}
@@ -115,8 +117,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_effect}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_effect}{}}}
\subsection{Method \code{plot_effect()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_effect()}\if{html}{\out{
}}
@@ -124,8 +126,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_effect_score}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_effect_score}{}}}
\subsection{Method \code{plot_effect_score()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_effect_score(effect_i = 1, component = 1)}\if{html}{\out{
}}
@@ -133,8 +135,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_effect_loading}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_effect_loading}{}}}
\subsection{Method \code{plot_effect_loading()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_effect_loading(effect_i = 1, component = 1)}\if{html}{\out{
}}
@@ -142,8 +144,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_effect_validation}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_effect_validation}{}}}
\subsection{Method \code{plot_effect_validation()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_effect_validation()}\if{html}{\out{
}}
@@ -151,8 +153,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_effect_validation_score}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_effect_validation_score}{}}}
\subsection{Method \code{plot_effect_validation_score()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_effect_validation_score(effect_i = 1, component = 1)}\if{html}{\out{
}}
@@ -160,8 +162,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_effect_validation_loading}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_effect_validation_loading}{}}}
\subsection{Method \code{plot_effect_validation_loading()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_effect_validation_loading(effect_i = 1, component = 1)}\if{html}{\out{
}}
@@ -169,8 +171,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_2D_advanced}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_2D_advanced}{}}}
\subsection{Method \code{plot_2D_advanced()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_2D_advanced()}\if{html}{\out{
}}
@@ -178,8 +180,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_2D}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_2D}{}}}
\subsection{Method \code{plot_2D()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_2D()}\if{html}{\out{
}}
@@ -187,8 +189,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_2D_score}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_2D_score}{}}}
\subsection{Method \code{plot_2D_score()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_2D_score()}\if{html}{\out{
}}
@@ -196,8 +198,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_2D_loading_1}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_2D_loading_1}{}}}
\subsection{Method \code{plot_2D_loading_1()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_2D_loading_1()}\if{html}{\out{
}}
@@ -205,8 +207,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_2D_loading_2}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_2D_loading_2}{}}}
\subsection{Method \code{plot_2D_loading_2()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_2D_loading_2()}\if{html}{\out{
}}
@@ -214,8 +216,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_histogram_score}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_histogram_score}{}}}
\subsection{Method \code{plot_histogram_score()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_histogram_score()}\if{html}{\out{
}}
@@ -223,8 +225,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_histogram_loading}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_histogram_loading}{}}}
\subsection{Method \code{plot_histogram_loading()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_histogram_loading()}\if{html}{\out{
}}
@@ -232,8 +234,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_histogram}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_histogram}{}}}
\subsection{Method \code{plot_histogram()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_histogram()}\if{html}{\out{
}}
@@ -241,8 +243,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_participants}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_participants}{}}}
\subsection{Method \code{plot_participants()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_participants(effect_i = 1, component = 1)}\if{html}{\out{
}}
@@ -250,8 +252,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-new}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-new}{}}}
\subsection{Method \code{new()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$new(model)}\if{html}{\out{
}}
@@ -259,8 +261,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-call_plot}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-call_plot}{}}}
\subsection{Method \code{call_plot()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$call_plot(...)}\if{html}{\out{
}}
@@ -268,8 +270,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_scree}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_scree}{}}}
\subsection{Method \code{plot_scree()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_scree()}\if{html}{\out{
}}
@@ -277,8 +279,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_residuals}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_residuals}{}}}
\subsection{Method \code{plot_residuals()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_residuals()}\if{html}{\out{
}}
@@ -286,8 +288,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-plot_covars}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-plot_covars}{}}}
\subsection{Method \code{plot_covars()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$plot_covars()}\if{html}{\out{
}}
@@ -295,8 +297,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-capitalize}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-capitalize}{}}}
\subsection{Method \code{capitalize()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$capitalize(txt)}\if{html}{\out{
}}
@@ -304,8 +306,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-prettify_covar}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-prettify_covar}{}}}
\subsection{Method \code{prettify_covar()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$prettify_covar(effect, txt)}\if{html}{\out{
}}
@@ -313,8 +315,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_plot_linetypes}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-get_plot_linetypes}{}}}
\subsection{Method \code{get_plot_linetypes()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$get_plot_linetypes()}\if{html}{\out{
}}
@@ -322,8 +324,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_plot_shapes}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-get_plot_shapes}{}}}
\subsection{Method \code{get_plot_shapes()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$get_plot_shapes()}\if{html}{\out{
}}
@@ -331,8 +333,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_plot_palette}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-get_plot_palette}{}}}
\subsection{Method \code{get_plot_palette()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$get_plot_palette()}\if{html}{\out{
}}
@@ -340,8 +342,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_explained_label}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-get_explained_label}{}}}
\subsection{Method \code{get_explained_label()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$get_explained_label(effect_i = 1, component = 1, type = "Score")}\if{html}{\out{
}}
@@ -349,8 +351,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_levels}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-get_levels}{}}}
\subsection{Method \code{get_levels()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$get_levels(x)}\if{html}{\out{
}}
@@ -358,8 +360,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-get_ref}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-get_ref}{}}}
\subsection{Method \code{get_ref()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$get_ref(x)}\if{html}{\out{
}}
@@ -367,8 +369,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-xflip}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-xflip}{}}}
\subsection{Method \code{xflip()}}{
\subsection{Usage}{
\if{html}{\out{}}\preformatted{AlascaPlot$xflip(flip = TRUE)}\if{html}{\out{
}}
@@ -376,8 +378,8 @@ Note: The object is typically accessed by \code{plot(obj, ...)} where the argume
}
\if{html}{\out{
}}
-\if{html}{\out{}}
-\if{latex}{\out{\hypertarget{method-clone}{}}}
+\if{html}{\out{}}
+\if{latex}{\out{\hypertarget{method-AlascaPlot-clone}{}}}
\subsection{Method \code{clone()}}{
The objects of this class are cloneable with this method.
\subsection{Usage}{
diff --git a/man/get_regression_predictions.Rd b/man/get_regression_predictions.Rd
index 21ad277..2879721 100644
--- a/man/get_regression_predictions.Rd
+++ b/man/get_regression_predictions.Rd
@@ -13,5 +13,5 @@ get_regression_predictions()
An ALASCA object
}
\description{
-This function calcuates predictions from each regression model
+This function calculates predictions from each regression model
}
diff --git a/man/predict_scores.Rd b/man/predict_scores.Rd
new file mode 100644
index 0000000..f4b19ff
--- /dev/null
+++ b/man/predict_scores.Rd
@@ -0,0 +1,21 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/ALASCA.R
+\name{predict_scores}
+\alias{predict_scores}
+\title{Calculate scores for a new data set}
+\usage{
+predict_scores(data, effect_i = 1, component = 1)
+}
+\arguments{
+\item{data}{A new data set}
+
+\item{effect_i}{The effect to look at}
+
+\item{component}{The PCA components to look at}
+}
+\value{
+A data table with new scores
+}
+\description{
+Calculate scores for a new data set
+}