An exhibit manager asks whether advance reservations help predict how long visitors will wait. One candidate model uses the entrance counts already logged on every shift. A second adds the number of advance reservations. The analysis yields an AIC of 85 for the simple model and 70 for the expanded one. It seems to be an easy choice. Then the manager notices a small entry next to each result: the first model used 100 rows, and the second used only 80. Both were drawn from the same spreadsheet, but they did not use the same evidence.

The verdict about the expanded model has not yet been earned. On a common set of 80 rows, in the invented example that follows, the simple model's AIC is 72 and the expanded model's is 70. The criterion still favors the expanded model in that comparison, but the apparent gap is two units rather than 15. More importantly, the two validly comparable numbers answer a narrower question than the original report suggested. They describe how two candidates balance fit and complexity on the shared evidence. They do not prove that the extra predictor will be available or helpful on the next busy weekend.
This article follows the comparison from data inventory to likelihood criterion to a separate evaluation of prediction. Its numbers are fictional and are not results from an actual queue or a fitted file. An analyst can take the same reasoning to any pair of likelihood models: verify the actual fitting cases, confirm that the likelihoods refer to the same response on a compatible basis, and name the conditions under which the fitted preference applies.
The problem starts before AIC is computed
In the exhibit example, suppose one observation represents a scheduled entrance window on a particular date. The response is that window's mean observed wait in minutes, measured consistently for the windows that enter the toy work. The simple model uses an entrance count already available at the intended prediction time, perhaps a recent, completed window's admissions. The expanded model adds a separate advance-reservation count for the target window as recorded before it began. We invent 100 windows with a defined response and a usable entrance count. Of these, only 80 have a usable advance-reservation entry. The other 20 are not “zero reservations.” They are missing the input.
This difference can arise for reasons that have nothing to do with modeling strategy. A reservation log might have started partway through the exhibit run. A system might have failed to save some windows, or the manual record might have been maintained on only some days. A later export might contain historic entries for some windows but not others. The details matter because missing cases need not look like complete ones. It is possible that the 80 usable windows happen to be quieter or to occur under more consistent operations. It is also possible that missingness is unrelated to conditions that matter. Neither explanation should be selected solely because it would excuse a preferred ranking.
The R documentation for fitting linear models describes the operation of missing-value handling through the model call's settings and the availability of a model frame, the data used in a fit, as a returned component. A typical omission rule can cause formulas with different inputs to use different cases. One fit can legally omit a group of rows that the other never needs to omit. This does not mean the software made a calculation error. It means that a downstream comparison may have been assembled despite different input records.
The important object for comparison is therefore not the original spreadsheet alone. It is each fitted model's actual set of observation identities, with response values and definitions checked. A filtered sheet can contain 100 rows before modeling and only 80 afterward. Both models might use 80 but omit different windows. Comparing only the counts would miss that second mismatch. Build an explicit account of whose rows entered rather than relying on memory about which file was selected.
The row identity needs to refer to a durable unit. A row number in a newly sorted table may no longer describe the same window. A sensible key in the invented exhibit could combine an entrance location and a date and time window, provided that combination really is unique. If readers are allowed to revise a queue measurement, a snapshot or version identifier can help distinguish an older stored response from a newer value. “Same row” should mean the same observation with the same response and analysis scope, not the same line number from two printouts.
What the criterion measures and where its calculation stops
The R reference for the Akaike information criterion defines the ordinary calculation as negative twice the maximized log-likelihood plus twice the number of fitted parameters used by the criterion. It explicitly identifies fitting by maximum likelihood to the same data as the basis for comparing smaller and larger AIC scores. A calculation can produce an AIC-like number outside these conditions. Getting a number is not equivalent to establishing the comparison.
The first term rewards better fit through the maximized likelihood. The second penalizes fitted complexity. This trade-off is not a correction for having a different dataset; the likelihood still comes from the data used by the fit. For ordinary independent observations a log-likelihood adds terms across included observations. Dropping observations can change that sum, change the estimated parameter values, and change the mix of easy and hard cases the model describes. The penalty counts parameters, not the hardship of the missing 20 windows. Nothing in the formula subtracts an allowance for the change of row set.
It is therefore a mistake to expect a lower score whenever fewer observations are used, even though that may happen in some comparisons. Log-likelihoods for continuous outcomes need not all have the same sign, and there is no universally meaningful direction for a comparison across differing observations. One should not invent a mathematical correction based on the ratio of 80 to 100. Dividing each score by its row count would yield two numbers normalized by different sample sizes. It would not make the underlying responses and observations the same or turn the comparison into ordinary AIC.
Uniform units also matter. Imagine a second analyst who changes the response from minutes waited to log minutes waited. They are now fitting a likelihood for a differently expressed outcome. The R document lists transformed responses as an example of a “same data” problem for naive comparison. A different response basis, incompatible normalizing constants or materially different weighting can make comparisons inappropriate even with identical row keys. In this article both aligned candidates use the same wait response in minutes, the same likelihood convention and the same unweighted evidence. The expanded candidate changes a predictor, not the quantity the response represents.
There is a more subtle problem with copying results between functions. The documentation notes that common likelihood helpers can use different additive constants, and that R's AIC and extractAIC can differ for linear models. A constant that is common to both candidates on the same basis does not affect their ranking. An unaccounted convention difference between scores can. Use one compatible route for the comparison and record it. The unit “criterion units” in this example is not minutes of waiting, probability of the model being true, or a percentage of forecast errors removed.
The original 15-unit gap is not a comparison result
The first analysis in the story fits the simple candidate on all 100 windows with sufficient inputs for it. Its illustrative score is 85. It fits the expanded candidate on the 80 complete windows and obtains the illustrative score of 70. It is fine to retain those two values in a diagnostic note about how the first run was made. It is not fine to subtract 70 from 85, call the result a 15-unit advantage for inclusion of the reservation variable, and use it to justify an operational choice. The subtraction is ordinary arithmetic on the wrong objects.
One can learn something from the original run without ranking it. The simple candidate has greater fitting coverage under the initial data availability. The expanded candidate has an input requirement that excludes 20 windows under complete-case analysis. Those facts might matter more to the manager than any refined statistic. If those 20 windows include the busiest days, a model available only on the other days may not be capable of serving the task as imagined. If the entry is missing only in the historical archive but will always be available later, the deployment concern might be different. Keep the coverage finding and investigate what produces it.
There is a tempting explanation for the simple score changing from 85 to 72 after restricting the rows: perhaps the 80 windows are easier to predict. They might be, but these values alone do not establish that. Maximizing on a different dataset can change the coefficient estimates, residual variation and likelihood total all at once. One cannot allocate 13 units specifically to removing difficult days, nor can one call those units a portion of the expanded model's achievement. To answer why the subset differs, inspect its composition and evidence instead of assigning a causal explanation to the difference in formula outputs.
A diagnostic record could therefore report the first run in words: original simple fit, 100 windows, AIC 85; original expanded fit, 80 windows, AIC 70; do not rank. The note protects the reproduction of that first mistake, which is useful if a draft has already circulated. A reader can trace where the numbers came from and see why the corrected picture differs. Deleting that history is not necessary. Moving it out of the headline and marking its comparison limits is.
Make the shared training set explicit, then refit both candidates
For the corrected toy comparison, form the set of windows with a defined wait response and valid entries for the predictors needed by either candidate. Stipulate that this intersection is exactly the 80 windows used by the original expanded fit and that the same response values are kept. Then refit the simple model and the expanded model on that set. Merely selecting the corresponding 80 prediction outputs from the original simple fit is insufficient: it leaves parameters estimated using all 100 windows. Evaluating those predictions may answer a different question, but it is not the matched maximum-likelihood fitting comparison.
There may be more to the check than overlapping IDs on input. An input transform could produce missing or nonfinite values for only one candidate. A formula could apply a further restriction, or a supplied weight could exclude some cases in one model. Confirm the fitted evidence and its definitions after preparation, not only that each call received the same data frame name. Where tooling allows, retain the row keys from the model frames or equivalent fitted objects; expose the keys' count, uniqueness and membership in a reproducibility record. The reader should not have to rely on a claim that both models came from the same repository.
Order is an additional practical check. For independent observations with the same responses and covariates, permuting rows should not transform the scientific comparison. But a join that reorders one side and keeps the rest by position can attach the wrong reservation count or outcome to a given window. In that case sets of IDs might appear to match while the underlying pairings are wrong. Preparing a canonical keyed event record, and checking that each predictor was joined on that key, protects the meaning of the comparison rather than only its cardinality.
The aligned expanded model retains the same illustrative score of 70 because in this example its data and fitting procedure were already exactly the same as they are in the shared run. There is no promise it always will. A procedure with a different preparation step, likelihood convention or corresponding data version could give a different value. What matters is that the version being named in the chart was fit and evaluated as part of the same defined comparison as the simple one. A reproducible report can distinguish rerunning a deterministic fit from copying the score because the labels looked similar.
Comparable toy AIC after alignment
The two bars represent fictional scores from the same 80 training rows under compatible likelihood calculations. They are not official benchmarks, real exhibit results or numbers taken from R's documentation. The lower value is favored only among these two candidates under this criterion and analysis scope.
| Model and fitting scope | Criterion units |
|---|---|
| Simple model shared rows | 72 |
| Expanded model shared rows | 70 |
A difference of two units is not two minutes saved or evidence that the manager will see a shorter queue. AIC describes the fitted models' relative criterion; it does not simulate a staffing intervention or compare observed waits after deploying a prediction system. Nor should a small difference support a claim that no other candidate could do better. Candidate lists are choices made by analysts. A chart can preference one candidate in a specified comparison without choosing an entire operating plan.
The arithmetic can be consistent with a simple nested Gaussian teaching example. If the simple candidate counts an intercept, one slope and an error variance as three fitted parameters, a maximized log-likelihood of negative 33 gives negative twice that log-likelihood, or 66, plus six, yielding 72. If the expanded one adds one slope and has a log-likelihood of negative 31, its fit term is 62, plus eight, yielding 70. These hypothetical likelihoods illustrate how the larger penalty can be outweighed by the better fit. They are also invented; no actual file of queues was fit to obtain them.
Parameter counting and fitted comparability need their own checks
It is easy to count the number of predictor names in a formula and assume that this is the penalty. A coded group can add more than one coefficient. A variance or other distribution parameter can also count. A column that is redundant may not supply an independently estimated coefficient. Different model classes and options generally obtain their parameter counts through the likelihood information or associated convention. In the example we stipulate simple full-rank models with counted variance parameters; in a real report take the parameter accounting from the compatible fitted output and verify that it reflects the intended model.
“Same rows” is a necessary check here, not an exemption from every other one. The target response, its transformation, the weights or exposures appropriate to the fit, and the likelihood base need attention. If one candidate models an average wait and the other predicts whether the average exceeded a threshold, the same 80 windows do not make their likelihoods comparable on the same outcome. If one candidate's inputs summarize several windows into one response category, its sample unit has changed. Correcting the row labels is not a way to ignore those substantive differences.
Estimation method matters too. A criterion built directly from the maximized likelihood of one model should not be casually ranked against a number based on a different objective that happens to resemble it. Estimates from regularized, cross-validated or approximate methods can be useful; one needs a justified basis before comparing their software-reported information criteria. R's documentation warns specifically about likelihood values not evaluated at the maximizing estimate. This is a limitation of the comparison, not a statement that every such fitting method is poor.
Keeping output definitions together avoids a communication problem. One dashboard might report AIC, another BIC, and a third a small-sample variant. Each has a definition and scope. They should not be plotted as interchangeable samples of one score simply because all are criteria. In a paired comparison say which criterion was used, what lower means in that comparison, and whether its assumptions are met. The article's chart of 72 and 70 concerns ordinary uncorrected AIC only, not any of those alternatives.
Held-out predictions answer a different question
Suppose the manager wants to know which candidate more accurately forecasts waits on future weekends. The aligned AIC comparison is not that test. The statistical motivation of AIC concerns estimated relative predictive information loss under assumptions; the values just reported still come from the fitted training likelihoods and penalty. They are not observed errors on new visitor windows. A held-out comparison would reserve outcomes that neither candidate used to fit, then compare predictions on those outcomes with a chosen loss. The test output might be expressed in minutes, unlike the chart above.
An error metric depends on what the manager finds costly. Mean absolute error describes the average magnitude of errors in minutes if the response is in minutes. Root mean square error gives more weight to large misses and also has the response's unit. Underprediction of the busiest periods might have different consequences from overprediction of the same size. That operational judgment can motivate extra reporting for peaks or a separately chosen loss. Nothing in the two AIC bars supplies that choice. Decide on it before seeking a result tailored to an already preferred model.
For a fair head-to-head evaluation on complete inputs, both candidates should predict for the same held-out windows, with the same definition of wait and the same coverage rules. If the simple model can cover more windows, report that additional capability separately. Comparing its errors on all held-out windows to the expanded model's errors on only easy complete windows repeats the original mismatch in a new form. Both coverage and error matter. A practical report can show the paired error comparison and then give a second account of how often either model can actually supply a prediction.
Training and checking also have clocks. Reservation activity recorded after the prediction time may be highly associated with the eventual wait, but it cannot help a real forecast made earlier. Make sure the predictor is defined from information available when the prediction will be issued, not from a finalized table containing later corrections. A set of clinically tidy rows held out from model fitting still fails as a simulation of use if key fields were collected after the decision. Look for that discrepancy before attributing excellent test errors to the model.
If successive windows are related, an arbitrary random split can put adjacent cases from the same burst into both training and evaluation. The resulting score might not represent performance on a genuinely new day or shift. An analyst may choose to hold out later blocks or entire events when those reflect the real question. The specific design should acknowledge what is novel at deployment. This is separate from making AIC comparable in the fitting stage. Both stages need clearly identified observations, but one asks about a shared fit and the other about performance on common, suitably separated new cases.
It is possible for the held-out result to disagree with the ranking from the fitted criterion. The extra variable might reduce the AIC among the fitted candidates and yet provide little additional benefit during a particular test period. The sample of future-like situations may differ, the error metric may reward different properties, or the realized results may vary because the evaluation is finite. Report that distinction directly. An analyst does not need to rename the AIC calculation a failure because it did not answer a forecasting question it was not designed to settle.
Who do the 80 common windows represent?
An aligned comparison can be internally appropriate and still have narrow external scope. The 20 omitted windows matter even though they do not enter the paired likelihoods. Ask how time of day, operating conditions or range of wait lengths differ across usable and unavailable reservation records. If some characteristics can be observed for all 100 windows, describe those as context for interpreting the complete-case result. A difference need not prove the missing reservations were themselves higher or lower. It can show that the setting represented in the 80 rows is not the same as the intended full population of windows.
If reservations will still sometimes be missing during use, an expanded model might operate alongside a simple fallback. That creates a new candidate at the level of the prediction policy. Its performance includes the switch behavior on unavailable cases, not just the accuracy of the expanded component when it can run. Such a policy can be assessed across the population of interest with a consistent evaluation rule. Its coverage and loss should not be confused with a single model's information criterion on its complete training subset.
Validating a missing-data strategy belongs in the analysis too. Replacing unavailable counts by zero would conflate a truly empty reservation window with a gap in documentation. A separate documented modeling approach could impute or otherwise account for the missing entries, but that would be a new analysis needing a clear method, training basis and evaluation. For predictive assessment, the missing-data handling must not use outcomes or other future information unavailable when forecasts are made. An imputed record should not be counted as direct evidence of the historical reservation condition. Making the software accept more rows does not automatically make the resulting quantities comparable.
There can be a good reason to retain a simple model fit on all 100 windows after the paired model investigation. If that is the actual version intended as a fallback, the additional observations may be valuable for that task. The key condition is to distinguish the fit used for the information-criterion comparison from the one chosen for use. An analyst can report that the shared-window experiment preferred the expanded form on AIC and separately explain why the deployed simple component was refit on more data. It is misleading only if those fit versions are relabeled as the original matched pair.
Make the comparison reproducible from a short report
A complete model note can be concise if it has the right pieces. Name the observation unit, the outcome and time of prediction. Record the model formulas or their equivalent specifications, the likelihood and penalty convention, any case restrictions, and the final number and membership of fitted cases. Keep the data snapshot and transformation rules that establish comparable outcome values. In the invented example the shared set is 80 complete windows and the chart reports ordinary AIC for two full-rank nested candidates. The original scores for different row sets may be retained with a visible warning against ranking.
A verification reviewer can inspect counts and then challenge them. Start by asking for the observation keys used after omission and preparation. Confirm that neither fit duplicated a window through a join. Check that the response and relevant weights align on those keys. If aligning produced a different model rank or singularity, investigate that rather than assuming the score remains the same kind of object. Finally, reproduce the arithmetic from the likelihood and parameter counts where those quantities are available and relevant. The reviewer should be able to see the origin of each bar without matching two numbers by eye.
A cautious correction can distinguish other possible changes too. A manager may receive two historical reports that give different AICs for a similarly named model. One could have used a different dataset version, treatment of missingness, likelihood convention or formula. Comparing the scores cannot identify which of those changed. Ask for the metadata and rerun a paired comparison where the evidence supports it. If neither original row set was saved, be transparent about the inability to diagnose the historical difference. A fresh fit should not be passed off as an exact reproduction of a missing record.
A good graphic inherits this discipline. The two comparable bars belong together under their shared-row title. If the invalid initial 85 and 70 are displayed to teach the lesson, present them as a warning about inputs rather than in the same implicit ranking. Include the fitting counts and which stage the numbers came from. A reader may see only the chart in a slide or excerpt. The important condition cannot be left in a separate paragraph that is likely to be cut. Visual separation helps prevent a tidy report from undoing the care taken in fitting.
Three counterexamples to a reassuring row count
The simplest counterexample uses the same number of windows in two places. The simple model may omit the first 20 windows because one version of the admission log begins late. The expanded model may omit the last 20 because the reservations file ends earlier than expected. Both objects report 80 observations, but the intersection contains only 60. Restricting each object to that intersection after fitting would not repair the estimates. A shared-data experiment would first establish the 60 cases and any additional eligibility constraints, then fit both candidates anew. Alternatively, if the resulting subset no longer answers a useful operational question, the proper result can simply be that the intended comparison was not supportable.
The second counterexample keeps both model frames numerically complete but updates the observed response in just one. Suppose a later data release corrected the ending of several wait measurements. An earlier fit and a later fit might have exactly the same window identifiers, while using different measured waits. A useful evidence fingerprint would include the response values and preparation choices as well as the keys. It should not expose individual visitor records merely to prove that the comparison was aligned. A private audit can check the actual frames, while a public report names the authorized snapshot and explains what was held fixed.
The third counterexample starts with equal rows and outcomes but applies different effective weights. Perhaps one candidate uses a higher weight for windows with more arriving visitors, while the other treats each window equally. That may be useful as a separate analytical choice, but it changes how cases enter the fit. To understand the consequence, ask whether the intended target is a typical window or an analysis that deliberately emphasizes busier windows. Merely describing the data as identical hides that shift. For a comparison meant to isolate adding the reservation predictor, the weighting basis and response should be common and appropriate.
These examples also explain why a single count column should be the beginning of a report, not the entire proof. A difference warns of a mismatch that readily needs explanation. Equality does not establish identity. The reporting workflow can make both checks inexpensive by deriving the candidate set once, checking each fit against it, and recording any substantive changes along the chain. If an application supports a strict mode that fails when a prepared field contains missing values, that can help catch unexpected omissions; it is not a substitute for verifying that the intended complete set was selected for the comparison in the first place.
Set up a clear second round of evidence
A good follow-up need not start over from the wrong question. Give the exploratory candidate comparison one table and the operational forecast comparison another. The first describes how two specified models trade off maximized training fit and parameter count on the same evidence. The second records which future-like windows are eligible, when the predictions are made, and how each policy performed. This separation also lets a reader see whether a more available fallback is retained even if the expanded form looks slightly better on the shared training criterion. There is no obligation for the two tables to point toward a single action.
Suppose a forecast trial returns similar mean errors but reveals that the expanded model makes fewer large underpredictions on windows with reliable reservations. That is a possible operational finding, not one obtained from the two-unit AIC difference. The next question would be whether those windows represent the decisions the manager needs to make and whether any extra burden of maintaining the reservation data is acceptable. It is entirely possible to prefer one candidate for staffed weekend alerting and another for a general public estimate, provided each use has been evaluated against an appropriate target.
If the review finds that many excluded windows came during a system outage, the missingness itself might be the main practical result. A predictor available on normal days is not necessarily available under the conditions when late warnings hurt the most. Testing a fallback policy on outage-like cases could be more useful than endlessly refining the complete-case likelihood comparison. That choice follows from the intended use and what the evidence covers, not from any general rule that simple models always travel better. Scope is an empirical question worth keeping separate from the prestige of a smaller criterion.
A compact review can end with three precise sentences. State which rows the matched criterion used and which candidate it favored. State what is known about performance and coverage on future-like cases, or that it has not yet been assessed. State what remains unknown about actions that would follow from a forecast. These sentences make it hard for someone to substitute one kind of evidence for another when rewriting the report for a meeting or a slide. They also give the next analyst an intelligible point of departure if new input records or independent evaluation windows become available.
A matched score is useful, not final
A comparison across weekly refreshes requires another kind of care. If the two candidates are aligned within each week, their scores can legitimately be ranked for that week's evidence. But a drop in one candidate's numerical score from one weekly refresh to the next does not necessarily mean the model is improving. New windows and different visitor patterns may have entered, so the fitted evidence has changed. A monitoring report can compare the week-specific rankings as labeled observations, or it can hold a stable test set aside and use a common loss to study predictive drift. It should not connect raw AIC values on a time plot and give their slope the meaning of improvement in prediction. The very condition that permits a within-week comparison explains why the cross-week one needs another basis.
Return to the exhibit manager. The proper correction is not “the expanded score was wrong.” The number 70 was stipulated for its coherent original fit. The improper step was comparing that number with 85 from different evidence. On the shared 80 windows the two candidate scores are 72 and 70, so the expanded one has the lower criterion under the shared analysis. That is a real conclusion within the toy setup. It says nothing directly about a 15-unit improvement, visitor wait reduction, or prediction on windows where the extra input is absent.
The next choice depends on the manager's aim. An exploratory analysis can use the aligned comparison to decide which relationships are worth closer examination. A forecast choice can compare held-out errors and coverage. A decision about staffing needs yet more evidence about how forecasts affect actions and how those actions affect waits. Those are natural extensions of the work, not aliases for AIC. Keeping them apart makes it easier to report a useful small result without implying a much larger one.
The simplest habit is to compare rows before ranking scores. Preserve the outcome and likelihood basis together with the actual fitting set, then report the preference on that evidence. No attractive difference among incompatible bars can save a lost comparison. Once the evidence is aligned, even a modest numerical difference can be described cleanly. In this case 72 and 70 are useful because they refer to two models built on the same question, not because either number tells the whole story on its own.