# How to code a fixed additive residual error without freeze (and keep FOCE-ELS available)

**URL:** <https://forum.certara.com/t/how-to-code-a-fixed-additive-residual-error-without-freeze-and-keep-foce-els-available/4432>\
**Category:** Pirana and RsNLME\
**Created:** [October 19, 2026, 3:47am UTC](https://forum.certara.com/t/how-to-code-a-fixed-additive-residual-error-without-freeze-and-keep-foce-els-available/4432 "2026-10-19T03:47:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Duffull](https://avatars.discourse-cdn.com/v4/letter/s/6f9a4e/32.png) [@Stephen\_Duffull](https://forum.certara.com/u/Stephen_Duffull)\
**Post date:** [October 19, 2026, 3:47am UTC](https://forum.certara.com/t/how-to-code-a-fixed-additive-residual-error-without-freeze-and-keep-foce-els-available/4432/1 "2026-10-19T03:47:39Z")

</div>

If you need one component of a combined (proportional + additive) residual error to be a fixed constant — the natural instinct is `error(CEpsAdd(freeze) = value)`. Worth knowing before you do that: freezing an `error()`/sigma term has a side effect beyond just fixing that value — it restricts `engineParams(method=...)` to `"Laplacian"`, `"QRPEM"`, `"IT2S-EM"`, or `"Naive-Pooled"`, and if you don’t specify a method explicitly, the default silently changes from FOCE-ELS to LAPLACIAN.

Here’s a way to get a fixed additive SD **without** touching `freeze` at all, so FOCE-ELS stays available.

The standard combined-error pattern has the _estimated_ `error()` term represent the additive SD, with the proportional coefficient as a separate `fixef()`:

```auto
error(CEpsAdd = 1)
fixef(tvPropErr = c(0, 0.1, ))
observe(CObs = C + CEpsAdd * sqrt(1 + C^2 * (tvPropErr/sigma())^2))

```

(A fixed _proportional_ coefficient — `fixef(tvPropErr(freeze) = ...)` — is fine here and does **not** trigger the restriction; it’s specifically freezing something in the `error()`/sigma block that does.)

If the **additive** component is the one that needs to be fixed, invert the roles and let the estimated `error()` term’s own SD (`sigma()`) directly represent the proportional coefficient, and declare the fixed additive SD as a plain `double()`or `real() `/`sequence{}` constant:

```auto
double(CAddFix)
sequence{
  CAddFix = 0.5 // the fixed additive SD - a true constant, never estimated
}

error(CEpsProp = 0.1) // estimated - its own SD IS the proportional coefficient

observe(CObs = C + CEpsProp * sqrt(C^2 + (CAddFix/sigma())^2)) # <units>

```

**Why this works:** `Var(CObs) = sigma()² · [C² + (CAddFix/sigma())²] = sigma()²·C² + CAddFix²`. Since `sigma()` estimates to the proportional coefficient, this is exactly `PROP²·C² + ADD_fixed²` — the usual combined-error variance, just with the fixed and estimated roles swapped relative to the familiar template.
