By Austin Little

Four display boards receive progressively thicker coats. A panel rates each board, and the raw mean scores, from the lowest application level to the highest, are four, eight, six, and nine. If the purpose of the analysis calls for a fitted response that never goes down as application level goes up, the middle two readings create a problem. They are in the wrong order for that constraint. One least-squares monotone fit gives four, seven, seven, and nine. It does not erase the raw evidence or establish that the two middle coats truly behave alike.
The repeated seven is a feature of the fitted model. It arises because the model must place one middle fitted value at or below the other while staying close to both observations. A common value of seven balances that particular conflict under equal weights and squared loss. The plateau says more about the relationship between the data and the constraint than about what happens to paint between the two application levels.
That distinction matters when the result enters a chart or a decision sheet. A horizontal line can look like physical evidence that changing the dose has no effect over a continuous range. A jump at the next point can look like a threshold. Neither follows from four ratings and an order restriction. The analysis is useful when it says which observations were pooled, what rule produced the fit, and what uncertainty remains about the physical process.
State the order before looking at the ratings
The four levels must have a meaningful order. In this example they represent increasing application levels on sample boards. The order belongs to how the boards were prepared, not to their recorded ratings. Sorting the ratings from low to high would yield four, six, eight, and nine, but it would move the scores to the wrong boards. A monotone fit changes fitted values as little as its criterion requires; it does not assign a new identity to a board.
Choose the direction from the scientific or operational question. A nondecreasing relation allows equal fitted values and prohibits a fall. It is not the same as a strictly increasing relation, which would prohibit equality. If the problem calls for a response that is nonincreasing, the permitted direction is reversed. If there is no defensible expectation of a single direction, a constrained fit may obscure an interesting pattern. The curve is not proof of whichever direction was selected.
The unit being fitted matters. The raw points here are mean scores for four levels, and the example gives each mean equal weight. Equal weights at the level level do not say that each individual rating was analyzed separately, or that every level mean has the same precision. A real set of means may come from different numbers of boards or judges. Decide what unit the analysis is intended to represent and keep observation counts, raw ratings, and summaries distinct when possible.
A study should also decide what small differences mean on its rating scale. Least squares gives larger differences greater influence through squaring. With a board score treated as numeric, this provides a concrete fitting objective. It does not, by itself, show that every point of difference has the same practical meaning or that the raters use the scale identically. If the scales or assessment questions differ across boards, standardizing the curve does not make their observations compatible.
Read the chart as fitted scores only
The invented observed means in order are four, eight, six, and nine. The chart does not repeat those means. It shows the fitted values obtained under the nondecreasing constraint with equal weights, retaining the same level identifiers. If reproduced as a stand-alone figure, it should carry an explicit indication that the numbers are fitted and that the example is fictional.
Monotone fitted scores across four sample levels
| Sample level | score units |
|---|---|
| Level one | 4 |
| Level two | 7 |
| Level three | 7 |
| Level four | 9 |
Illustrative only. Invented values, not taken from a source dataset or an official target. The R documentation supports the method, not the scores.
In this calculation the fitted values at levels one and four agree with the raw values. The second level is lowered by one score unit and the third is raised by one. The total squared discrepancy is two square score units: one from the second level, one from the third, and none from the endpoints. Keep the signed changes when reviewing the fit. Seeing two deviations of equal size does not mean they point in the same direction.
The flat middle section is not a separate observation. Nobody in the example measured seven a second time. The two fitted values match because the constraint and loss together assigned one shared value. If a report retains only fitted values, a later reader cannot tell whether the original middle readings were eight and six or both seven. Those raw scenarios imply different evidence. The same display shape can hide why the fit looks that way.
Both the scale and the categories need clear labels. The vertical scale is score units; the four labels are ordered sample levels. The distance between neighboring labels need not correspond to an equal difference in physical thickness unless that spacing was measured. A bar chart of fitted values at known levels does not automatically define what the fit should predict for every possible thickness.
Find the local conflict and test the pooled value
An increasing-in-the-weak-sense fit must put the fitted value for level two at or below the fitted value for level three. The observed values of eight and six violate that requirement. Suppose the two fitted values were distinct and strictly increasing. If they are both unconstrained by their outer neighbors locally, the one nearer eight could be moved upward or the one nearer six downward until the conflict disappears only at equality. The unconstrained preferred values cannot both remain. At the least-squares compromise for this pair, the fitted values meet.
Call the common value seven for a moment and check it against alternatives. A common value of six leaves residuals of two and zero, for a squared sum of four. A common value of eight leaves zero and two, again totaling four. A value of seven gives two deviations of one, totaling two. More generally, the squared-error function for a shared value is a quadratic minimized at the arithmetic mean of the two equal-weight observations. This is why the equal-center compromise is not merely a cosmetic choice.
Check the neighbors after pooling. The first level is four and the fourth is nine. Both inequalities surrounding seven are in the allowed direction, so the middle pair can form one block without requiring any more pooling. Keeping the endpoints at their observed values costs no error for them. If a pooled value fell outside the appropriate relationship with the blocks beside it, the procedure would need to revisit the adjacent boundaries.
One direct way to justify optimality here is to separate the inevitable cost of fitting levels two and three from the nonnegative costs at levels one and four. The permitted fit for the middle pair cannot do better than the shared value seven under this criterion. The endpoints can each have zero error while respecting its position. The result therefore attains the smallest possible loss for the whole sequence, not just an improvement over an obvious bad alternative.
This local argument is easy because the affected block is small. It should not become a general recipe of averaging each falling pair once without checking the rest. An adjustment can create another order violation with a neighboring fitted block. The general idea is repeated checks between adjacent blocks with updated block values until the resulting order is permitted. The term pool adjacent violators is commonly used for that approach. What makes it intelligible in this example is that one pass through the offending pair is enough.
Understand what changes when weights change
Equal weights mean that the fitting objective counts each level mean equally in the squared-error total. If one level is intentionally given more influence, the pooled fitted value is the corresponding weighted average when those same levels are the only ones pooled. This follows from minimizing the weighted squared deviations. The fit changes because the analyst chose a different objective, not because the two latest raw means suddenly acquired different measured values.
For a supplementary fictional calculation, suppose the second level is assigned twice the weight of the third. The common value would be the sum of twice eight and once six divided by three, or twenty-two thirds. That remains between the outer fitted values of four and nine, so the local pooled block remains feasible under these particular hypothetical weights. These weights are not part of the table or proposed as preferable. Their only role is to demonstrate which part of the solution depends on the objective.
Weights can represent several different ideas. They may represent replication at a level, inverse measurement variance under an appropriate model, or an explicitly chosen cost of deviations at that level. These interpretations are not interchangeable. A large group of raters can affect precision differently if the raters are not independent, and pooling an average with a count weight is not a universal recipe for optimizing every performance criterion. State the meaning of weights rather than letting an integer column seem self-explanatory.
With raw observations grouped by a common level and ordinary squared loss, fitting a common value at that level gives a relevant algebraic identity: the sum of squared deviations separates into within-level variation plus a count times the squared distance from the level mean. The within-level component does not change with that fitted value. In that specific setting, count-weighted means can recover the same optimum as a fit to all raw responses with the same level constraints. That is an argument with assumptions, not a general equivalence for any kind of summary.
The R isotonic regression documentation describes a nonparametric monotone least-squares fit and its piecewise constant representation. It also notes that the documented function does not have a weighted fitting argument. Do not copy a weighted calculation into a procedure using that function as though weights were being passed to it. The equal-weight example fits the documented method's purpose. A weighted case needs a method that actually implements the intended objective and appropriate checks.
It is often helpful to show an unweighted fit and a deliberately planned weighted sensitivity calculation side by side. Record what changed and what did not. If a pooled block changes location or level, discuss the dependence on the weighting assumptions. Do not pick the weighting rule merely because its fit better supports a preferred physical story. The evidence about the boards is unchanged; the fitted answer to a defined optimization problem can change.
Distinguish a step representation from evidence between measurements
The R step functions documentation explains how constant pieces, jump locations, and endpoint conventions define an evaluable step function. That is relevant when someone needs a function rather than four tabulated fitted points. An endpoint convention can determine which constant value the function returns exactly at a jump. It is a representation choice with practical consequences for software, not a measurement of exactly where the material's behavior changes.
In the article's main example, four ordered levels are enough to assign fitted values at those levels. If a designer draws a horizontal segment between two middle scores of seven, the line is an extension of how the fit is represented. It does not mean that every physical thickness between the two tests was actually prepared and measured. A reader needs a signal for the difference, such as showing raw points at the measured levels and identifying the connecting segments as fitted structure.
There may not even be measured physical distances between application levels. If levels represent controlled categories or a priority order, it is inappropriate to put the labels on a numeric thickness axis and infer lengths of constant response. If actual thicknesses are measured in unequal gaps, a chart should not imply that the gaps are equal unless the axis is explicitly categorical. An order-restricted fit uses an order. Additional claims about distances require additional x-axis information.
A software consumer may want a value at a level that was never tested. Decide whether the system should return unavailable, use a conventional step interpolation, or compute a separate suitable model. If every query receives a number, users may assume the model was validated between and beyond the observed levels. Document the supported domain. A prediction outside that domain is not made trustworthy by using the last observed fitted value indefinitely.
Endpoint conventions can be tested directly. Evaluate the function immediately below and above an assigned knot and exactly at it, and note where the resulting piece begins. This is crucial for reproducible reporting when a renderer and an application use different conventions. But the test verifies what the program returns, not a physical threshold. Keep the language as narrow as the verification.
Show why a plateau is not necessarily a flat mechanism
Several distinct histories can lead to the same fitted plateau. The two raw middle means might exactly match because the measurements happen to agree. They might reverse as in this example. They might be nearly equal within the resolution of the score. The constrained fit can put them at the same value under all of those situations, though the raw evidence differs. A plateau in a chart cannot identify which history produced it unless the underlying observations remain visible.
A true physical flat region is a different claim. It says that some response is effectively unchanged over a specified range under defined conditions and within an appropriate precision or tolerance. That sort of claim requires a definition of the range, a meaningful notion of negligible change, and observations or a design that support comparison within it. Two values pooled to satisfy order do not establish all of those things. They do not even show which of the two raw deviations reflects the underlying process.
One useful counterexample imagines that the real mean increases gently across all four levels but a small set of ratings is noisy. The observed means could still include a local reversal and produce a pooled block. Another possible world has a genuine temporary dip associated with some confounding condition or a real nonmonotone effect. The same constrained fit can hide that dip. The fit cannot by itself choose between these possibilities because its search was restricted to one direction from the start.
A threshold claim is still stronger in another way. It locates a change in response at or near a particular boundary. The jump in a step display can simply result from how observed levels and block boundaries are encoded. Without observations around the proposed boundary and a meaningful model, the display jump should not be presented as a material switch. Keeping this limitation near a figure can prevent a fitted slope or jump from becoming a production rule by accident.
If an operator needs a cutoff for practical reasons, the decision can still use a fit as one input. Other criteria, such as cost, reproducibility, and the consequences of errors, need to be stated separately. Do not claim that an operational choice is an empirically discovered threshold just because a step function offers a clean breakpoint. An explicit rule is often easier to validate than a physical justification the data do not support.
Preserve the raw reversal as a result worth examining
A monotone fit makes a selected signal easier to see, but the local reversal should remain in the record. It may raise questions about score consistency, board preparation, labels, or conditions at evaluation. Those are separate investigations. Leaving the raw reversal visible lets another reviewer consider a different model or identify a simple measurement problem. A data pipeline that overwrites raw values with fitted ones makes those questions much harder to answer.
Start a review by checking the identity of the middle boards. Did the two recorded means belong to the intended application levels? Do the ratings use the same scale? Are there relevant differences in measurement time or visual conditions? A verified mismatch can be corrected transparently. A real reversal does not need correction merely because it violates the preferred direction. Constraining a curve is an analysis step, not editing the record to match a hypothesis.
Review variation within each level when it is available. The difference between means can hide wide individual disagreement or very consistent observations. A mean of eight from several evenly high scores provides different context from an eight produced by a mix of very high and moderate opinions. Reporting the underlying sample size and the spread can help readers judge how much information the means contain. Those quantities do not follow from the four means alone.
If the same panelists judged all four levels, their ratings are likely linked within person. The illustrative least-squares objective applies to four chosen means regardless, but uncertainty about the curve should not be computed as though these means necessarily came from independent groups. Record the design rather than assuming a generic error structure. A fitted series and a valid inference about sampling variation are distinct tasks.
Likewise, comparing the raw pattern to multiple fitted models can be informative, but a choice made after seeing the data should be described honestly. If an unconstrained view shows a dip that disappears under the imposed order, explain why the constraint was considered appropriate. If evidence later suggests a more complex response, reconsider the choice rather than labeling all contrary observations noise. A smooth or orderly fit does not automatically have a sounder scientific interpretation.
Explore a case where pooling propagates to a neighbor
The article's main example is deliberately small and ends after joining two levels. It is useful to think through a supplementary sequence in which a first pooled block still violates order with the preceding level. Imagine observations of one, eight, ten, and two with equal weights. The last two conflict and pool at six. This still sits below the previous observed eight, so treating the last pair in isolation would leave the fitted series nonmonotone. The block must be reconsidered with its neighbor.
The three observations eight, ten, and two average twenty thirds. That value is above the first level's one, so the final ordered values for this secondary example can be one followed by a common value of twenty thirds for levels two through four. The illustration makes a careful point about bookkeeping: once a block pools two records, it represents both and carries their total weight. Averaging six and eight as though each were one observation would produce seven, not the correct block mean for the three equal-weight observations.
This second sequence is not part of the chart or the main example's data. It helps show why a general implementation must use blocks with sizes or weights, not simply smooth each pair in order and stop. The appropriate stopping condition is that the fitted block levels obey the required order across all neighbors. A reviewer can test a simple cascading conflict before relying on code to handle larger series.
Do not read the length of a pooled block as a direct measure of scientific similarity. A large block can result from one strongly conflicting final observation, several smaller reversals, or particular weighting choices. A small block can occur even over levels whose physical meaning is quite different. If the size of the block affects interpretation, describe the raw pattern and the objective that made that block optimal rather than naming its extent as an empirical flat zone.
Build useful checks for a monotone analysis
One basic validation is monotonicity itself. Walk the fitted values in the documented design order and confirm that each next value is at least the preceding value, subject to the chosen numerical tolerance when appropriate. A successful check means the output meets the chosen constraint. It does not establish that the underlying process is monotone or that the study measured it accurately. Label the validation clearly.
Also check that the result minimized the intended objective in small cases with known solutions. For the main example verify that the middle block is seven and its outer neighbors can stay at four and nine. For an already ordered input, an exact fit can keep every observed score unchanged. For a cascading conflict, verify that the implementation carries total block weight as it recomputes group values. Together these cases catch mistakes that a monotonicity check alone can miss.
Test a case with ties and confirm the data convention for identical application levels. Sometimes actual repeated measurements at one physical level need to share a fitted value. Sometimes the labels are categorical steps that only appear tied after rounding a display label. Handle according to the study design and software's documented requirements. Do not create a false ordering or merge distinct levels because they happened to print with the same formatted label.
Missing values should not be turned into zeros unless that is an actual observed score under a documented rule. If a board has no usable rating, keep that absence explicit and do not give an interpolated result the status of a raw measurement. An interpolation can be reported separately if the model calls for it. The four-level example assumes all four raw means exist, so it does not define missing-data handling for an actual study.
Finally, reproduce the figure from the same values the analysis exports. A discrepancy can happen if the renderer recomputes a curve from rounded observations or treats categories in a different order. Check the raw labels, fitted labels, and repeated central value. State the interpolation convention if the output includes values between levels. Plotting checks are a separate part of reproducibility, not merely cosmetic clean-up.
Use the result only at the scale of the evidence
A short report might lead with the pattern: the observed average increased from the first to the second level, decreased at the third, and increased again at the fourth. With a nondecreasing least-squares constraint and equal weights, the fitted sequence pools the two middle observations at seven. This wording preserves both the observed decline and the model decision. A sentence saying only “the response rose and then stabilized” could easily be mistaken for a description of the observations.
When the constrained fit is part of a decision process, record how the decision uses it. A summary could help compare the levels while avoiding a fitted decrease that the analyst has a defensible reason to exclude. The report still needs fit diagnostics and a justified rule for dealing with the middle tie. Automatically choosing the lower level from a tie could be a cost-based policy, for example. It is not what the statistical procedure proved about equality in real performance.
Be precise about the intended prediction. The four levels are directly represented by the fitted scores; a new manufacturing condition may differ in more than application thickness. The response could depend on preparation, material age, evaluator, or conditions not varied in the sample. A model trained on these levels does not establish transfer to another material or another definition of the score. Document the boundaries alongside any fitted summary used outside the analysis.
Some uncertainty is about the input and some is about the rule. More independent readings can help characterize level means. A more reliable rating protocol can reduce ambiguity in the recorded scores. A reasoned sensitivity analysis can show the effect of weights or a different loss. None by itself can prove the monotonicity assumption. Treat these as distinct ways to improve the analysis rather than promising that another measurement will resolve every limitation.
A small report can include a raw-versus-fitted figure, an eligible sample count by level, the weighting and constraint information, and a note about the middle block. Keep the hypothetical chart's source attribution clear. The R manuals document methods and software behavior; neither supplies the boards or ratings in the example. That clarification prevents a reader from searching for a real laboratory series behind an educational figure.
Review the handoff at the points likely to cause misunderstanding
Ask an independent reader to identify the eight and the six before showing them the seven. If they cannot find the raw readings, the report has not preserved the evidence needed to explain the pool. Then ask what the flat segment means. A correct answer should mention the model and the order restriction. A claim of unchanged physical performance across all thicknesses is more than the figure can show.
An analyst can also check whether the receiver understands the distinction between adjacent in order and close in measured distance. Two levels can be neighboring categories while representing a wide physical gap, or they can be nearly identical along one dimension and quite different in preparation. Label the axis accordingly. A renderer should not turn a decision about category order into a misleading statement about the width of a physical plateau.
If a model's output is consumed by code, write a narrow contract. State whether values are fitted at the four levels only, whether interpolation is available, and what convention applies at boundaries. Keep raw identifiers aligned with ordered results. A downstream consumer should not use a different level sort because the string labels happened to put ten before two. Such an error can be avoided with explicit order information and a test that reconstructs the display.
Revision also needs a clear story. New data could separate the middle scores in a way consistent with the constraint, or could require a different block. A plot changing shape after a larger study does not mean the first four records were incorrectly measured. It means the adopted objective was applied to different evidence. Archive the earlier input and settings with the earlier output so changes can be traced without relying on memory.
Compare an orderly fit with other ways of representing the same observations
A table of raw means is an appropriate first representation. It preserves the local decline and lets the reader judge whether the middle discrepancy is substantial on the chosen scale. An unconstrained straight line would answer a different question by imposing a constant slope rather than merely a nondecreasing relationship. It might miss both the reversal and most local changes. An isotonic fit restricts the direction but does not impose one rate of change across all the levels. The resulting summaries are not alternatives to the record; they describe it under different goals.
A moving average is also a different operation. It can reduce visible variation by taking nearby observations into account, but it does not necessarily return a nondecreasing sequence. Its averaging windows may mix across levels even when the observed order already meets the constraint. In the four-board example, the monotone objective requires changing the middle pair and can keep the endpoints. A general smoother may move all four values. Matching the method to the question is more important than whether the two charts initially look similar.
An unconstrained fit with near-perfect agreement is not necessarily more informative either. If a model simply reproduces four values without any useful restriction, it accurately describes the in-sample points but may not support prediction or comparison. The monotone fit spends some in-sample fit to express a requirement the analyst has chosen. The relevant question is whether that requirement makes sense for the intended use and whether the retained residuals show features that demand attention. A numerical improvement in one metric does not settle the broader tradeoff.
Plot raw values and fitted values on one set of axes when it is possible to distinguish them clearly. Use different shapes or labels, not color alone. The endpoints coincide, so a legend should make clear that an observation and its fitted value are represented there even if only one prominent mark is visible. At the middle levels the reader should see the raw decline from eight to six and the separate pair of fitted sevens. This display directly supports the explanatory claim that the plateau was produced by pooling.
If people use a chart primarily to compare individual levels, a companion table may be more useful than an interpolated step graphic. It can name each level and show raw, fitted, and change columns. The table can retain the subgroup of levels that share a fitted block through a label or note. Do not imply the pooled levels were the same batch or the same treatment. They remain distinct levels that happen to share a fitted response under this objective.
Test how the shape depends on one changed reading
Replace the third raw mean with seven in a secondary thought experiment, while leaving the first, second, and fourth at four, eight, and nine. The violation is now one unit. Under the same equal-weight rule, the middle levels pool at seven and a half. There is still a plateau, despite a different raw discrepancy. Its existence does not reveal the severity of the original conflict, and its new height does not say that a physical flat region moved vertically.
If instead the third raw mean were eight, the middle values would agree without any local adjustment. A step plot could still show a middle plateau. Its appearance would be similar to the pooled case, but the residuals would not tell the same story. This is a useful edge case for a reporting system: two equal adjacent fitted values are not necessarily evidence that two conflicting observations were pooled. Retain the raw inputs or, where appropriate, a record of what the fit algorithm actually did.
A further example changes the first fitted neighborhood by raising the first raw reading substantially. Then the middle pooling can spread leftward after a neighbor check, depending on the proposed values. What happens is tied to the full constrained objective, not simply to the two middle means. A report that describes each block independently of its adjacent context can obscure why a minor change in one part of the design moves a fitted value elsewhere.
If a user needs to know how sensitive a decision is to small measurement changes, design the sensitivity check around plausible changes in the input means or weights. Record the scope and rationale. A series of invented tweaks is good for testing the logic but is not a substitute for sampling uncertainty or validation. It should not be reported as a probability that the material behaves a certain way. Demonstrations and real estimation have different roles.
An independent reviewer can use sensitivity to identify which parts of a report are robust. For example, the outer levels may remain ordered and distinct across several credible scenarios while the middle tie changes. That finding can support a cautious statement about the dependence of the fit without locating a physical threshold. If conclusions for the intended decision flip under plausible small changes, that is useful information about the decision, not a reason to conceal the values from the reader.
There is a related lesson for archived software output. Preserve the exact input order, the raw measurements at the resolution used, and the actual configuration of the method. Rounding the raw values for display and later fitting from the rounded table can change whether an adjacent conflict exists at all. A reproducible release should let analysts examine that discrepancy without guessing which version produced the printed chart.
Leave the distinction in the final sentence
Under equal weights and squared loss, the fictitious sequence four, eight, six, and nine fits to four, seven, seven, and nine when fitted scores cannot decrease. The two middle scores share a value because the raw observations conflict with their required order. The fit does not certify a flat physical response, and a drawn jump does not identify a material threshold. Preserve the observed values, the fitting objective, and the interpretation limits wherever the curve is used.