Learn R Programming

colleyRstats (version 0.0.1)

reportNparLD: 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).

Description

#' 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)

Value

A message describing the statistical results.

Arguments

model

the model

dv

the dependent variable

write_to_clipboard

whether to write to the clipboard

Details

#' To easily copy and paste the results to your manuscript, the following commands must be defined in Latex: \newcommand{\F}{\textit{F=}} \newcommand{\p}{\textit{p=}} \newcommand{\pminor}{\textit{p$<$}}

Examples

Run this code
# \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)),
    TLX1    = stats::rnorm(30, mean = 50, sd = 10)
  )

  # Fit nparLD model
  model <- nparLD::nparLD(
    TLX1 ~ Time,
    data        = example_data,
    subject     = "Subject",
    description = FALSE
  )

  # Report the nparLD result
  reportNparLD(model, dv = "TLX1")
  }
# }

Run the code above in your browser using DataLab