c.estimate: Concatenate estimate objects

View source: R/estimate_calculus.R

c.estimateR Documentation

Concatenate estimate objects

Description

When all arguments are estimate objects, they are merged into a single estimate object. When some arguments are not estimate objects but are named numeric scalars/vectors, the merged estimate object is returned with an "extra" attribute containing the provided values. This is useful for bundling auxiliary per-iteration information (e.g., convergence status) alongside an estimate for use with sim.default().

Usage

## S3 method for class 'estimate'
c(..., as.list = FALSE)

Arguments

...

estimate objects and/or named numeric values

as.list

if TRUE the returned object will be of class list and not an estimate object.

Details

arguments drop.ic, paired, sep are passed to merge.estimate

Value

An estimate object. If extra named numeric values were provided, the result carries an "extra" attribute (a named numeric vector).

See Also

sim.default() merge.estimate()

Examples

e <- estimate(coef = c(a = 1, b = 2), vcov = diag(2) * 0.1)
# Bundle estimate with extra information
res <- c(e, converged = 1, niter = 10)
attr(res, "extra")

lava documentation built on Oct. 23, 2026, 1:09 a.m.