Why a Model Specification Needs More Than a Formula
A statement such as “we fitted a regression adjusting for age and treatment” leaves important questions unanswered. Was age entered linearly or in groups? Which treatment group was the reference? Were all eligible records analyzed, or only records with complete data? Was the model fitted by ordinary least squares, and were observations weighted? These choices can change the fitted model or the uncertainty estimates, so a report should make them explicit.
A model specification describes what was fitted, not what the analysis found. It identifies the outcome, predictors, functional forms, coding, analysis sample, and relevant fitting options. Estimates, intervals, and their interpretations are separate reporting tasks.
For a linear regression with \(n\) observations and \(p\) predictors, a common model statement is
Here \(Y_i\) is the outcome for observation \(i\), \(X_{ij}\) is predictor \(j\) for observation \(i\), \(\beta_0,\ldots,\beta_p\) are model parameters, and \(\varepsilon_i\) is the error. This equation does not, by itself, tell a reader what the variables mean, whether a predictor was transformed, how categories were coded, or how the model was fitted. Those details belong in the specification too.
In the usual linear-model setup, the conditional mean is represented by the stated regression terms, and the errors have conditional mean zero given the predictors. Ordinary least squares (OLS) estimates the coefficients by minimizing the sum of squared residuals. Standard-error calculations make additional choices: for example, a conventional homoscedastic standard error uses a constant conditional error variance, while a heteroscedasticity-robust or cluster-robust standard error uses a different variance estimate. A report should name the choices actually used rather than imply that they are interchangeable.
What to State Explicitly
A reader should be able to answer each of the following questions from the report. Use ordinary language as well as an equation: equations are concise, but only if their symbols and coding are defined.
- Outcome: What variable is modeled, in what units, and, when relevant, over what measurement period?
- Predictors: Which variables appear on the right-hand side? Avoid vague phrases such as “adjusted for relevant covariates.” Name each one.
- Functional forms: Does each continuous predictor enter linearly, as a square, through a logarithm, or in another stated form? Are interactions included?
- Coding: For categorical predictors, what are the levels and reference category? For any numeric coding, what do the values mean?
- Analysis sample: Which observations were eligible for this model, and how was the analysis set determined? State the analyzed count and the rule used for missing data when relevant.
- Fitting options: Name the estimator and any consequential options, such as weights or a non-default standard-error method.
The analysis sample is model-specific: a record must contribute the outcome and the model inputs in the form required by the fitting procedure. If a report says “complete-case analysis,” it should clarify which variables had to be observed. If weights were used, say what the weights represent and how they entered the fitting procedure. A reader should not have to infer these choices from a generic software command.
Worked Example: A Linear Model With Two Predictors
Suppose a hypothetical clinic data set contains 124 eligible adults. The outcome is systolic blood pressure at a scheduled visit, measured in mmHg. The predictors are treatment group, coded 1 for the program and 0 for usual care, and age in years. One record lacks the outcome and five others lack age; the analysis uses records with observed values for all three variables. State the specification.
The complete-case rule leaves \(124-1-5=118\) records, assuming the records missing the outcome and age are distinct. The reported analysis count is therefore \(n=118\); if those sets overlap, the count must instead be calculated from the actual records meeting the rule.
Let \(Y_i\) be visit systolic blood pressure in mmHg, \(T_i\) the treatment indicator, and \(A_i\) age in years. A linear additive specification is
A reproducible description would say that the outcome is visit systolic blood pressure in mmHg; treatment is coded 1 for the program and 0 for usual care; and age enters as a linear term in years. The analysis is a complete-case analysis requiring observed blood pressure, treatment group, and age, with 118 records analyzed. If fitted by OLS without weights and with conventional homoscedastic standard errors, those fitting choices should also be stated. This description does not claim that treatment caused any observed difference.
Functional Forms and Coding Are Part of the Model
A predictor’s name is not enough to identify its role. “Age included” could mean age enters as a single linear term, as age squared, as age categories, or through a transformation. Each choice describes a different regression model. Centering a continuous predictor also changes the meaning of the intercept, even when a corresponding model can express the same fitted values.
For a categorical predictor with \(K\) levels, a common approach is to choose one reference level and include \(K-1\) indicator variables. Each indicator equals 1 for its named level and 0 otherwise. The reference level is represented by all indicators being 0. State the reference explicitly; “categorical treatment” does not tell a reader which comparisons the model encodes.
For example, if \(A_i\) is age in years and \(C_i\) indicates a category, a model containing \(A_iC_i\) includes an interaction: the relationship between age and the conditional mean is allowed to differ by category. Merely listing age and category as predictors would not communicate that feature. Similarly, a quadratic term \(A_i^2\) should be stated as a square, not hidden under “age adjusted.”
Worked Example: Reporting Reference-Category Coding
In a hypothetical sample, a three-level program variable has levels standard care, coaching, and coaching plus reminders. The outcome is a six-month score in points. Let standard care be the reference category. Define \(C_i=1\) for coaching and 0 otherwise, and \(R_i=1\) for coaching plus reminders and 0 otherwise. A model also includes baseline score \(B_i\), entered linearly.
The specification is
For a standard-care participant, \(C_i=0\) and \(R_i=0\); for a coaching participant, \(C_i=1\) and \(R_i=0\); for a coaching-plus-reminders participant, \(C_i=0\) and \(R_i=1\). Thus each category has a defined coding pattern, with standard care as the reference. The two indicators encode three categories without including a redundant indicator for every category alongside an intercept. A report should also state that the outcome is the six-month score in points and baseline score enters as a linear term. If the analysis used 206 records with observed values for the outcome, category, and baseline score, it should report \(n=206\) and the rule used to form that set.
Deriving Why Coding Must Be Reported
The indicator coding above is not merely a presentation convention; it determines how category-specific model values are represented. To see this, temporarily omit baseline score and consider the model \(Y_i=\beta_0+\beta_1C_i+\beta_2R_i+\varepsilon_i\). The model’s conditional mean is the non-error part of the equation.
These expressions follow by substituting each category’s indicator values into the model’s conditional mean. If coaching rather than standard care were chosen as the reference, the indicators and coefficient meanings would change. The underlying comparison might be expressible in another parameterization, but the reported coefficients could not be interpreted from a reference label that was left unstated. This is why a complete specification identifies the reference level and the coding, not only the factor’s name.
Worked Example: A Quadratic Term and an Interaction
Consider a hypothetical analysis of 90 adults. The outcome is a symptom score at follow-up, measured in points. The predictors are age \(A_i\), recorded in years; an indicator \(G_i\), coded 1 for group B and 0 for group A; and their interaction. The analyst also includes centered age \(A_i-50\) and its square. The specified mean model is
A complete description says the outcome is follow-up symptom score in points; age is centered at 50 years and enters both linearly and quadratically; group B is coded 1 and group A is the reference; and the product of centered age and group is included. It also states which 90 records were analyzed and the rule used to determine eligibility for this model. If the equation was fitted by OLS, the report names OLS and specifies the standard-error method. Without the squared term, a reader would reconstruct a different age pattern; without the interaction, the model would impose the same linear age component for both groups. The equation therefore communicates structure that a short phrase such as “age-adjusted model by group” does not.
Sample and Fitting Details That Affect Reproduction
A model can be described correctly on the full data set and still be impossible to reproduce if the analyzed observations are unclear. Report the number of records used for the particular model and a concise, unambiguous rule for inclusion. For example, “among eligible records with observed outcome, treatment, and age” identifies a complete-case rule for those variables. If several models use different inputs and therefore different records, give the sample count and rule for each model rather than suggesting that all models use one common sample.
Also report fitting choices that affect the coefficient estimates or their uncertainty. Examples include OLS versus a different estimator, whether observation weights were applied, and whether standard errors were conventional, heteroscedasticity-robust, or clustered. For clustered standard errors, name the clustering unit. These details do not require a long software description, but they should be specific enough to distinguish the procedure actually used. If an option is not relevant or was not used, do not imply otherwise.
A concise specification might therefore combine an equation with one explanatory sentence: “The outcome was six-month score in points. The model included program indicators with standard care as the reference and baseline score as a linear predictor; it was fitted by OLS on 206 complete records, without weights, using conventional homoscedastic standard errors.” The statement names the structure and the main fitting choices without reporting or interpreting coefficient estimates.
Common Mistakes
- Writing only “adjusted for covariates.” This does not identify the predictors or their forms. Name each predictor and say whether it is linear, transformed, categorized, or involved in an interaction.
- Omitting a reference category. A factor’s coefficients depend on its coding. State the levels, the reference level, and how the indicator variables are defined.
- Leaving out the analysis count. The eligible sample size is not necessarily the fitted-model sample size. State the count analyzed and the variable-based rule used to determine it.
- Confusing the model with the result. A specification tells the reader what was fitted; it does not establish a causal effect or communicate the estimate, uncertainty, or evidence against a null hypothesis.
- Reporting “robust standard errors” without saying what that means. Name the method used and, for clustered calculations, the clustering unit. Different uncertainty calculations should not be treated as interchangeable.
Check Your Understanding
For each question, focus on the information needed to reconstruct the model rather than on interpreting its estimates.
- A report says, “We regressed test score on school type and prior achievement.” What additional information about functional forms and categorical coding would make the specification clearer?
- A three-level predictor is represented by two indicators. What must a report state about the omitted level, and why?
- A model uses a log-transformed income predictor. What details should be stated so readers know which variable entered the equation?
- Explain why a model report should give both the number of eligible records and the number analyzed when missing values lead to exclusions.
- A report says that clustered standard errors were used. What additional fitting detail is needed for a reader to identify the clustering scheme?