Report the model produced by nparLD. The model provided must be the model generated by the command 'nparLD' nparLD (see https://CRAN.R-project.org/package=nparLD).
Source: R/reporting.R, R/zzz-aliases.R
reportNparLD.Rd#' Only significant main and interaction effects are reported. P-values are rounded for the third digit and relative treatment effects (RTE) are included when available. Attention: the independent variables of the formula and the term specifying the participant must be factors (i.e., use as.factor()).
Usage
reportNparLD(
model,
dv = "Testdependentvariable",
write_to_clipboard = FALSE,
sink_to = NULL
)
report_nparld(
model,
dv = "Testdependentvariable",
write_to_clipboard = FALSE,
sink_to = NULL
)Value
Invisibly returns the reported sentence(s) as a character vector;
the text is also emitted via message().
Details
#' To easily copy and paste the results to your manuscript, the following commands must be defined in Latex:
\newcommand{\F}{\textit{F=}}
\newcommand{\df}{\textit{df=}}
\newcommand{\p}{\textit{p=}}
\newcommand{\pminor}{\textit{p$<$}}
Naming
report_nparld() is the spelling used throughout the documentation and
the one to prefer in new code: the report_* / plot_* / check_* prefixes
make the API discoverable through autocomplete.
reportNparLD() is the original
name. Both names refer to the same function object, so they are entirely
interchangeable; the original remains fully supported and is not scheduled
for removal, and existing scripts keep working unchanged.
Examples
# \donttest{
if (requireNamespace("nparLD", quietly = TRUE)) {
# Small toy data set for nparLD
set.seed(123)
example_data <- data.frame(
Subject = factor(rep(1:10, each = 3)),
Time = factor(rep(c("T1", "T2", "T3"), times = 10)),
# a rising trend over time, so there is something to report
TLX1 = rep(c(45, 52, 61), times = 10) + stats::rnorm(30, sd = 4)
)
# Fit nparLD model
model <- nparLD::nparLD(TLX1 ~ Time, data = example_data, subject = "Subject")
# Report the nparLD result
reportNparLD(model, dv = "TLX1")
}
#> The nparLD analysis found a significant main effect of \Time on TLX1 (\F{2}{$\infty$}{37.78}, \pminor{0.001}).
# }