designedExperimentRegression

fun ReportBuilder.designedExperimentRegression(de: DesignedExperimentIfc, responseName: String, linearModel: LinearModel, confidenceLevel: Double = 0.95, coded: Boolean = true, showDiagnosticPlots: Boolean = true, caption: String? = null)(source)

Appends a self-contained regression-analysis section for a single response from de.

This bridge function fits an OLS model to the across-replication mean responses at each design point and delegates all rendering to the existing regressionSummary, regressionParameters, and (optionally) regressionDiagnostics extension functions.

Produces (inside a section titled caption or "Regression Analysis — <responseName>"):

  1. Regression Setup DataTable — response name, factor count, term count (excluding intercept), intercept flag, and display scale

  2. ANOVA and Model Fit — via regressionSummary: ANOVA table, R², adjusted R², RMSE, and overall F-test p-value

  3. Coefficients — via regressionParameters: coefficient estimates, standard errors, t-statistics, p-values, and confidence intervals with significance codes

  4. Diagnostics (when showDiagnosticPlots is true) — via regressionDiagnostics: residual summary, normal probability plot, residuals-vs-fitted plot, and residuals-vs-order plot

Prerequisite: de must have been executed before calling this function; otherwise DesignedExperimentIfc.regressionResults will have no data.

Parameters

de

the DesignedExperimentIfc whose results supply the regression data

responseName

the name of the response to fit; must appear in de.responseNames

linearModel

the model specification (factors, interaction terms, intercept flag)

confidenceLevel

confidence level for coefficient intervals; defaults to 0.95

coded

true (default) = coded (−1/+1) scale; false = original scale

showDiagnosticPlots

true (default) = include residual diagnostic plots; false = summary and coefficients only (useful for large documents)

caption

optional section title; defaults to "Regression Analysis — <responseName>"