Type: Package
Title: Statistical Quality-Assured Integrated Response Estimation
Version: 1.0.1
Date: 2025-11-22
Author: Richard A. Feiss ORCID iD [aut, cre]
Maintainer: Richard A. Feiss <feiss026@umn.edu>
Description: Provides systematic geometry-adaptive parameter optimization with statistical validation for experimental biological data. Combines ANOVA-based validation with systematic constraint configuration testing (log-scale, positive domain, Euclidean) through T,P,E testing. Only proceeds with parameter optimization when statistically significant biological effects are detected, preventing over-fitting to noise. Uses 'GALAHAD' trust region methods with constraint projection from Conn et al. (2000) <doi:10.1137/S1052623497325107>, ANOVA-based validation following Fisher (1925) <doi:10.1007/978-1-4612-4380-9_6>, and effect size calculations per Cohen (1988, ISBN:0805802835). Designed for structured experimental data including kinetic curves, dose-response studies, and treatment comparisons where appropriate parameter constraints and statistical justification are important for meaningful biological interpretation. Developed at the Minnesota Center for Prion Research and Outreach at the University of Minnesota.
License: MIT + file LICENSE
Encoding: UTF-8
Depends: R (≥ 4.2.0)
Imports: stats, GALAHAD (≥ 1.0.0), knitr
Suggests: testthat (≥ 3.0.0), rmarkdown
VignetteBuilder: knitr
RoxygenNote: 7.3.3
Config/testthat/edition: 3
NeedsCompilation: no
URL: https://github.com/RFeissIV/SQUIRE
BugReports: https://github.com/RFeissIV/SQUIRE/issues
Packaged: 2025-11-23 00:38:32 UTC; feiss026
Repository: CRAN
Date/Publication: 2025-11-30 23:40:06 UTC

SQUIRE: Statistical Quality-Assured Integrated Response Estimation

Description

Systematic adaptive GALAHAD framework: 1. Statistical validation 2. Systematic T->P->E geometry discovery (3 focused runs) 3. Final optimization with discovered optimal settings 4. Done!

Usage

SQUIRE(
  data,
  treatments,
  control_treatment = treatments[1],
  validation_level = 0.05,
  min_timepoints = 5,
  min_replicates = 3,
  verbose = TRUE
)

Arguments

data

Data frame with columns: time, response, treatment, replicate

treatments

Character vector of treatment names

control_treatment

Name of control treatment for comparisons

validation_level

Statistical significance level (default: 0.05)

min_timepoints

Minimum timepoints required for fitting (default: 5)

min_replicates

Minimum replicates per treatment (default: 3)

verbose

Logical, print progress messages

Value

List with validation results, systematic GALAHAD discovery, and final parameters

Examples


# Synthetic germination data for demonstration
test_data <- data.frame(
  time = rep(c(0, 1, 2, 3, 4, 5, 6, 7), times = 12),
  treatment = rep(c("Control", "Contaminant_A", "Contaminant_B"), each = 32),
  replicate = rep(rep(1:4, each = 8), times = 3),
  response = c(
    0, 5, 15, 28, 45, 62, 75, 82,    # Control
    0, 4, 12, 26, 43, 60, 73, 80,
    0, 6, 17, 30, 47, 64, 77, 84,
    0, 5, 14, 27, 44, 61, 74, 81,
    0, 2, 8, 18, 32, 48, 60, 68,     # Contaminant_A
    0, 3, 7, 16, 30, 46, 58, 66,
    0, 2, 9, 19, 34, 50, 62, 70,
    0, 3, 8, 17, 31, 47, 59, 67,
    0, 8, 22, 38, 55, 72, 85, 92,    # Contaminant_B
    0, 7, 20, 36, 53, 70, 83, 90,
    0, 9, 24, 40, 57, 74, 87, 94,
    0, 8, 21, 37, 54, 71, 84, 91
  )
)

result <- SQUIRE(test_data, c("Control", "Contaminant_A", "Contaminant_B"))
if (result$optimization_performed) {
  print(result$parameters$parameter_matrix)
}



Generate Example Data for SQUIRE

Description

Creates a simple example dataset suitable for testing SQUIRE functionality. The data simulates a germination experiment with three treatments.

Usage

generate_example_data(n_time = 8, n_rep = 4, seed = NULL)

Arguments

n_time

Number of time points (default 8)

n_rep

Number of replicates per treatment (default 4)

seed

Random seed for reproducibility (default NULL)

Value

A data frame with columns: time, treatment, replicate, response

Examples

# Generate example data
example_data <- generate_example_data(seed = 123)
head(example_data)

# Check structure
str(example_data)
table(example_data$treatment, example_data$time)


Simple Parameter Optimization Without GALAHAD

Description

A simplified version of parameter optimization that doesn't require GALAHAD. Used for examples and testing when GALAHAD is not available.

Usage

optimize_simple(data, constraints = "positive")

Arguments

data

Data frame with time and response columns

constraints

Character vector specifying constraints ("positive", "none")

Value

Named vector of parameters: rate, offset, scale

Examples

# Create simple growth data
simple_data <- data.frame(
  time = rep(0:7, 4),
  response = rnorm(32, mean = rep(seq(0, 50, length.out = 8), 4), sd = 2)
)

# Optimize parameters
params <- optimize_simple(simple_data, constraints = "positive")
print(params)


Print SQUIRE Results

Description

Print SQUIRE Results

Usage

## S3 method for class 'SQUIRE'
print(x, ...)

Arguments

x

SQUIRE results object

...

Additional arguments