Skip to contents

Page's trend test for detecting ordered alternatives in repeated measures data. This test is used when there is a specific predicted ordering of the treatment effects or time points, making it more powerful than the general Friedman test when the alternative hypothesis specifies a trend or ordered pattern.

Usage

pagetrendtest(
  data,
  dependent,
  subject,
  within,
  trend_direction = "increasing",
  custom_order,
  method = "asymptotic",
  alpha = 0.05,
  effect_size = TRUE,
  confidence_level = 0.95,
  show_ranks = TRUE,
  show_descriptives = TRUE,
  friedman_comparison = TRUE,
  show_assumptions = TRUE,
  clinical_interpretation = TRUE
)

Arguments

data

the data as a data frame

dependent

Continuous or ordinal dependent variable measured repeatedly

subject

Variable identifying subjects/cases for repeated measurements

within

Factor variable indicating the repeated measure conditions/time points (must be orderable)

trend_direction

Expected direction of trend across conditions

custom_order

Custom ordering of factor levels when trend_direction is 'custom' (e.g., 'baseline,week1,month1,month6')

method

Method for calculating p-values

alpha

Alpha level for hypothesis testing

effect_size

Include effect size measures (Page's L coefficient and trend strength)

confidence_level

Confidence level for confidence intervals

show_ranks

Show detailed rank analysis and trend components

show_descriptives

Show descriptive statistics for each condition

friedman_comparison

Include comparison with standard Friedman test

show_assumptions

Assess assumptions and provide recommendations

clinical_interpretation

Provide clinical interpretation guidance for results

Value

A results object containing:

results$instructionsa html
results$dataInfoa table
results$trendOrderinga table
results$descriptiveStatsa table
results$pageTrendTesta table
results$effectSizea table
results$rankAnalysisa table
results$friedmanComparisona table
results$assumptionAssessmenta table
results$clinicalInterpretationa table
results$trendPlotan image
results$rankTrendPlotan image
results$comparisonPlotan image
results$profilePlotan image
results$methodExplanationa html

Tables can be converted to data frames with asDF or as.data.frame. For example:

results$dataInfo$asDF

as.data.frame(results$dataInfo)

Examples