olmm-overwritePar: Overwrite coefficients of 'olmm' objects.

olmm-overwriteParR Documentation

Overwrite coefficients of olmm objects.

Description

Overwrite coefficients of an olmm object and update the likelihood and estimates for random effects.

Usage


olmm_overwritePar(object, coefficients)

Arguments

object

an olmm object.

coefficients

numeric vector of model coefficients. Must have the same length as object$coefficients and, if provided, the same element names.

Details

May be used for simulation studies where parameters are user defined.

Value

An olmm object.

Author(s)

Reto Burgin

See Also

olmm

Examples

data(schizo)

model.10.3.1 <-
  olmm(imps79o ~ tx + sqrt(week) + re(1|id),
       data = schizo, family = cumulative())
summary(model.10.3.1)

(newCoef <- coef(model.10.3.1))
newCoef[1:3] <- c(-7, -4, -2) # thresholds
newCoef["tx"] <- 1.5
newCoef["sqrt(week)"] <- 1.6
newCoef[6] <- 2

model.10.3.1.mod <- olmm_overwritePar(object = model.10.3.1, coefficients = newCoef)
summary(model.10.3.1.mod)


vcrpart documentation built on Aug. 27, 2025, 1:08 a.m.