Learn R Programming

lava (version 1.9.3)

c.estimate: 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 estimate
c(..., as.list = FALSE)

Value

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

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

See Also

sim.default() merge.estimate()

Examples

Run this code
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")

Run the code above in your browser using DataLab