Skip to contents

Laboratory assay optimization and experimental design for clinical research. Includes power calculations, sample size determination, design optimization, and quality control for laboratory assays.

Usage

assayoptimization(
  response_var,
  factors,
  blocking_vars = NULL,
  covariates = NULL,
  design_type = "factorial",
  optimization_goal = "maximize_response",
  target_value = 1,
  power_analysis = TRUE,
  alpha_level = 0.05,
  power_level = 0.8,
  effect_size = 0.5,
  replicates = 3,
  randomization = "complete",
  quality_control = TRUE,
  control_charts = "xbar_r",
  robust_methods = FALSE,
  response_surface = TRUE,
  contour_plots = TRUE,
  optimization_plots = TRUE,
  export_design = FALSE,
  method_validation = FALSE,
  confidence_level = 0.95
)

Arguments

response_var

Primary assay response variable for optimization

factors

List of experimental factors for optimization

blocking_vars

Variables for experimental blocking

covariates

Covariates to include in the analysis

design_type

Experimental design approach for factor optimization

optimization_goal

Goal for assay optimization

target_value

Target response value for optimization

power_analysis

Whether to perform power analysis

alpha_level

Significance level for hypothesis testing

power_level

Target power for the experimental design

effect_size

Expected effect size for power calculations

replicates

Number of replicates per experimental condition

randomization

Randomization strategy for the experiment

quality_control

Whether to include QC analysis

control_charts

Control chart methodology for QC

robust_methods

Whether to use robust statistical approaches

response_surface

Whether to perform response surface methodology

contour_plots

Whether to generate contour plots

optimization_plots

Whether to generate optimization plots

export_design

Whether to export the design matrix

method_validation

Whether to include validation analysis

confidence_level

Confidence level for statistical intervals

Value

A results object containing:

results$instructionsa html
results$design_summarya html
results$power_analysisa html
results$optimization_resultsa html
results$factor_effectsa html
results$response_surface_summarya html
results$quality_control_summarya html
results$validation_metricsa html
results$design_plotan image
results$effects_plotan image
results$response_surface_plotan image
results$optimization_plotan image
results$control_chartan image
results$diagnostic_plotsan image
results$power_plotan image

Examples

# Example: Optimize PCR assay design
assayoptimization(
    data = pcr_data,
    response_var = concentration,
    factors = c("primer_conc", "temperature", "cycles"),
    optimization_goal = "maximize_efficiency",
    design_type = "factorial"
)