Skip to contents

curveR: bead_assay adding timeperiod cohort_arm

Generate design variables for the example data.

add_bead_assay_design()
Add study design columns to bead_assay_example samples
curveR-package curveR
curveR: Calibration Curve Ecosystem for Quantitative Immunoassays

curveRcore: Forward models

Five canonical sigmoidal forward model functions shared across all fitting engines.

logistic4()
Four-Parameter Logistic (4PL) Forward Function (from curveRcore)
logistic5()
Five-Parameter Logistic (5PL) Forward Function (from curveRcore)
loglogistic4()
Four-Parameter Log-Logistic (Dose-Response) Forward Function (from curveRcore)
loglogistic5()
Five-Parameter Generalised Logistic (Richards) Forward Function (from curveRcore)
gompertz4()
Four-Parameter Gompertz Forward Function (from curveRcore)
available_models()
List all available model names (from curveRcore)
model_params()
Model registry: parameter names for each model family (from curveRcore)
build_nls_formulas()
Build NLS Formulas for Candidate Models (from curveRcore)

curveRcore: Inverses

Analytical back-calculation functions for all five models.

inv_logistic4() inv_logistic4_fixed()
Inverse of the 4PL Model (from curveRcore)
inv_logistic5() inv_logistic5_fixed()
Inverse of the 5PL Model (from curveRcore)
inv_loglogistic4() inv_loglogistic4_fixed()
Inverse of the loglogistic4 Model (from curveRcore)
inv_loglogistic5() inv_loglogistic5_fixed()
Inverse of the loglogistic5 Model (from curveRcore)
inv_gompertz4() inv_gompertz4_fixed()
Inverse of the Gompertz Model (from curveRcore)

curveRcore: Derivatives and gradients

First and second derivatives plus analytical gradient closures used for delta-method uncertainty propagation.

dydx_logistic4()
First Derivative of the 4PL Model (from curveRcore)
dydx_logistic5()
First Derivative of the 5PL Model (from curveRcore)
dydx_loglogistic4()
First Derivative of the loglogistic4 Model (from curveRcore)
dydx_loglogistic5()
First Derivative of the loglogistic5 Model (from curveRcore)
dydx_gompertz4()
First Derivative of the Gompertz Model (from curveRcore)
d2x_logistic4()
Second Derivative of the 4PL Model (from curveRcore)
d2x_logistic5()
Second Derivative of the 5PL Model (Numerical) (from curveRcore)
d2x_loglogistic4()
Second Derivative of the loglogistic4 Model (Numerical) (from curveRcore)
d2x_loglogistic5()
Second Derivative of the loglogistic5 Model (Numerical) (from curveRcore)
d2x_gompertz4()
Second Derivative of the Gompertz Model (from curveRcore)
grad_logistic4()
Analytical Gradient of the Inverse 4PL (from curveRcore)
grad_logistic5()
Analytical Gradient of the Inverse 5PL (from curveRcore)
grad_loglogistic4()
Analytical Gradient of the Inverse loglogistic4 (from curveRcore)
grad_loglogistic5()
Analytical Gradient of the Inverse loglogistic5 (from curveRcore)
grad_gompertz4()
Analytical Gradient of the Inverse Gompertz (from curveRcore)
make_inv_and_grad_fixed()
Build Inverse, Gradient, and grad_y Closures for a Model (from curveRcore)

curveRcore: Preprocessing and transforms

The preprocessing pipeline applied upstream of both fitting packages.

preprocess_standards()
Full Preprocessing Pipeline for Standard Curve Data (from curveRcore)
compute_concentration()
Compute Concentration from Dilution and Undiluted Standard (from curveRcore)
compute_log_response()
Log10-Transform the Assay Response (from curveRcore)
correct_prozone()
Correct the Prozone (Hook) Effect (from curveRcore)
perform_blank_operation()
Apply a Blank Operation to Standard Curve Data (from curveRcore)
resolve_fixed_lower_asymptote()
Resolve the Fixed Lower Asymptote Value (from curveRcore)
adaptive_constraint_profile()
Build an Adaptive Constraint Profile from Observed Data (from curveRcore)
validate_fixed_lower_asymptote()
Validate a Fixed Lower Asymptote Before Log Transformation (from curveRcore)

curveRcore: Settings and configuration

Constructor functions for fit settings objects.

new_antigen_constraints()
Create Antigen-Level Constraint Settings (from curveRcore)
new_fit_options()
Create Model Fitting and Grid Options (from curveRcore)
new_study_params()
Create Study-Level Fitting Parameters (from curveRcore)
resolve_effective_models()
Resolve Effective Models for a Given Configuration (from curveRcore)
resolve_response_col()
Resolve the Response Column Name (from curveRcore)

curveRcore: Output class and extractors

The shared calibration_result S3 class and tidy-style extractors. Both fitting packages return objects of this class so downstream code is engine-agnostic.

new_calibration_result()
Construct a Calibration Result Object (from curveRcore)
new_calibration_result_multiplate()
Construct a Multi-Plate Calibration Result (from curveRcore)
tidy_samples()
Tidy the per-sample predictions from a calibration result (from curveRcore)
tidy_grid()
Tidy the precision grid from a calibration result (from curveRcore)
pcov_from_se() se_from_pcov()
Convert between posterior CV (pcov) and the log10-scale concentration SD (from curveRcore)
compare_calibrations()
Compare Two Calibration Results (Grid Predictions) (from curveRcore)
compare_parameters()
Compare Parameters Between Two Calibration Results (from curveRcore)
compare_samples()
Compare Sample Predictions Between Two Calibration Results (from curveRcore)
agreement_metrics()
Compute Agreement Metrics Between Paired Predictions (from curveRcore)

curveRcore: Eligibility gating and model selection

Four-gate eligibility check applied identically by both fitting packages before AIC or LOO-CV selection.

assess_model_eligibility()
Assess Model Eligibility for Quantification (from curveRcore)
select_best_eligible()
Select the Best Eligible Model (from curveRcore)

curveRcore: Detection and quantification limits

LOD, MDC, RDL, shape-based LLOQ/ULOQ, and CDAN precision grids.

compute_detection_limits()
Compute and attach detection limits to a calibration_result (from curveRcore)
compute_detection_limits_multiplate()
Compute detection limits for all plates in a multiplate result (from curveRcore)
compute_shape_loq_from_grid()
Compute curvature-based (shape) LOQs from an enriched grid (from curveRcore)
enrich_grid_with_d2y()
Add a d2y_dx2 column to an existing prediction grid (from curveRcore)
generate_prediction_grid()
Generate a Prediction Grid of Concentrations (from curveRcore)
compute_curve_ci()
Compute Confidence Interval for Fitted Curve (from curveRcore)
predict_grid_response()
Compute Predicted Response for a Grid (from curveRcore)

curveRfreq: Calibration fitting

Frequentist multi-start Levenberg–Marquardt NLS calibration. fit_calibration_freq_multiplate() is the primary entry point.

fit_calibration_freq()
Fit a Frequentist Calibration Curve (Single Curve) (from curveRfreq)
fit_calibration_freq_multiplate()
Fit Frequentist Calibration Curves Across Multiple Curves (from curveRfreq)
fit_ensemble_nls()
Fit Ensemble of NLS Models for One Plate (from curveRfreq)
generate_start_lists()
Generate Multi-Start Lists for NLS Fitting (from curveRfreq)
compute_model_constraints()
Compute Parameter Bounds for All Candidate Models (from curveRfreq)

curveRfreq: Model selection and prediction

AIC ranking, best-parameter extraction, and uncertainty propagation.

summarise_ensemble()
Summarise Ensemble Fit Statistics (from curveRfreq)
extract_best_parameters()
Extract Parameters from the Best Fit (from curveRfreq)
select_best_aic()
Select the Best Model by AIC (from curveRfreq)
predict_grid_freq()
Predict Grid with Uncertainty (Frequentist) (from curveRfreq)
predict_samples_freq()
Predict Concentration for Test Samples (from curveRfreq)

curveRfreq: Multi-curve helpers

Tidy extractors for multiplate calibration results.

summary_table()
Extract a Combined Summary Table from Multi-Curve Results (from curveRfreq)
collect_samples()
Extract All Sample Predictions from Multi-Curve Results (from curveRfreq)

curveRbayes: Calibration fitting

Bayesian hierarchical calibration via Stan. All curve_id values are fitted simultaneously in a single hierarchical model.

fit_calibration_bayes()
Fit Bayesian Hierarchical Calibration Curves (from curveRbayes)
compile_stan_model()
Compile a curveRbayes Stan Model (Cached) (from curveRbayes)
fit_bayes_single()
Fit a Single Model Family via MCMC (from curveRbayes)
extract_curve_params()
Extract Curve-Level Posterior Summaries (from curveRbayes)

curveRbayes: Stan data and priors

Data preparation for Stan and data-adaptive weakly informative hyperprior construction.

build_stan_data()
Build Stan Data List for a Model Family (from curveRbayes)
compute_dynamic_priors()
Compute Data-Adaptive Priors for Stan Models (from curveRbayes)

curveRbayes: LOO-CV model selection

PSIS-LOO cross-validation and Bayesian stacking weights.

compute_loo()
Compute LOO-CV for a Fitted Bayesian Model (from curveRbayes)
compare_models_loo()
Compare Models via LOO-CV and Stacking Weights (from curveRbayes)

curveRbayes: Posterior prediction and CDAN precision

Posterior predictive grid (CDAN three-step procedure) and test-sample back-calculation.

predict_grid_bayes()
Predict Grid Response from Posterior Draws (Bayesian, CDAN) (from curveRbayes)
predict_samples_bayes()
Back-Calculate Sample Concentrations from Posterior Draws (from curveRbayes)

curveRbayes: Multi-curve helpers

Tidy extractors for multiplate Bayesian calibration results.

summary_table_bayes()
Extract a Per-Curve Summary Table from Bayesian Results (from curveRbayes)
collect_samples_bayes()
Collect All Sample Predictions from Bayesian Results (from curveRbayes)

curveRweights: curveR ecosystem entry points

The recommended API for users coming from curveRfreq or curveRbayes. Convert calibration results to weight inputs, estimate phi and beta1, apply weights to new data, and join weights back onto sample frames.

as_weight_data()
Build precision-weight input from a curveR calibration result (from curveRweights)
fit_precision_weights()
Estimate precision weights from a curveR calibration result (from curveRweights)
predict_weights()
Apply fitted precision weights to new observations (from curveRweights)
join_weights()
Join estimated weights back onto a data frame (from curveRweights)

curveRweights: Core fitting and diagnostics

The joint Bayesian location-scale model and supporting diagnostics.

fit_saturated_weight()
Fit a Bayesian Location-Scale Model with Saturated Location and Shared Scale (from curveRweights)
fit_saturated_weight_batch()
Fit Saturated Weight Models Across Multiple Groups (from curveRweights)
apply_saturated_weights()
Apply Previously Estimated Scale Parameters to New Data (from curveRweights)
compute_saturated_weights()
Compute Precision Weights from Estimated Scale Parameters (from curveRweights)
weight_diagnostics()
Compute Summary Diagnostics for Precision Weights (from curveRweights)
prepare_cv()
Prepare the Precision Index from Calibration Curve Output (from curveRweights)
diagnose_cv()
Diagnose Precision Index Variation for Scale Estimation (from curveRweights)
interpret_beta1()
Interpret the Estimated Beta1 Value (from curveRweights)