CGNM_result-class: CGNM_result-class

CGNM_result-classR Documentation

CGNM_result-class

Description

An optional, opt-in S4 alternative to the classic plain-list output of Cluster_Gauss_Newton_method, Cluster_Gauss_Newton_Bootstrap_method, and Cluster_Gauss_Newton_EBE_method (set outputS4 = TRUE on any of those functions to receive one instead of a list).

Every field that the classic list output ever contains (X, Y, residual_history, initialX, initialY, lambda_history, finalParameterCombinations, runSetting, the bootstrap fields, and the EBE fields) is a slot here, and $, $<-, [[, [[<-, and names() all work exactly as they do on the classic list. This means every existing postprocessing or plotting function in this package (acceptedApproximateMinimizers(), table_parameterSummary(), plot_goodnessOfFit(), etc.) accepts a CGNM_result S4 object as a drop-in replacement for the list, with no change in behavior. The only difference from the classic list is that inherits(x, "CGNM_result")/is(x, "CGNM_result") lets calling code (including automated tooling) confirm the object's identity, which a plain list cannot do.

Existing code that relies on the classic list output is unaffected: outputS4 defaults to FALSE everywhere.

When outputS4 = TRUE, two further slots are populated so that profile-likelihood functions (plot_profileLikelihood, compare_profileLikelihood, table_profileLikelihoodConfidenceInterval, plot_SSRsurface, suggestInitialLowerRange, suggestInitialUpperRange) can be used directly on the object with no dependency on saveLog/disk/working directory: X_history/Y_history hold every intermediate iteration of the main fit (normally discarded once the final result is assembled), and bootstrapIterationHistory holds the equivalent history from Cluster_Gauss_Newton_Bootstrap_method, if one was run. Both are NULL unless outputS4 = TRUE was used, so the memory cost of retaining them is opt-in.

Usage

## S4 method for signature 'CGNM_result'
x$name

## S4 replacement method for signature 'CGNM_result'
x$name <- value

## S4 method for signature 'CGNM_result'
x[[i, j, ...]]

## S4 replacement method for signature 'CGNM_result'
x[[i, j, ...]] <- value

## S4 method for signature 'CGNM_result'
names(x)

Arguments

x

a CGNM_result object.

name

string the slot/field name, as used with $ and $<- (e.g. "X").

value

the replacement value, as used with $<- and [[<-.

i

string the slot/field name, as used with [[ and [[<- (e.g. "X").

j

not used; present for consistency with the [[ generic.

...

not used; present for consistency with the [[ generic.


CGNM documentation built on Sept. 13, 2026, 9:06 a.m.