umxRAM_GLM: Path-based RAM model with mxFitFunctionGLM

View source: R/umxRAM_GLM.R

umxRAM_GLMR Documentation

Path-based RAM model with mxFitFunctionGLM

Description

Standalone counterpart to umxRAM() for conditional exponential-family manifests. Latents are anything in the paths that is not in data. Manifests are anything in the paths (or in families) that is in data. Residual S on family items is fixed at 0. An observed column used only as from (a predictor) is not given residual S or a mean; the arrow uses that row's value. Manifests not listed in families that have residual S are Gaussian. Does not call mxRefModels() (no CFI yet).

Usage

umxRAM_GLM(
  model = NA,
  ...,
  data = NULL,
  families = NULL,
  theta = NULL,
  nAGQ = NA_integer_,
  name = NA,
  autoRun = getOption("umx_auto_run"),
  tryHard = c("no", "yes", "ordinal", "search"),
  setValues = TRUE,
  suffix = "",
  verbose = FALSE
)

Arguments

model

a model name (character). Updating an existing model is not supported.

...

umxPath() / mxPath() objects, optional mxMatrix(), mxConstraint(), and mxFamily() objects. Not data.

data

a data.frame or raw mxData(). Required (used to detect manifests vs latents and to set starts).

families

named list of stats::family or mxFamily() objects. Names are manifest variables. Items not listed are Gaussian.

theta

optional named numeric (fixed) or character (free-parameter label) for NB size / Gamma shape / inverse-Gaussian lambda.

nAGQ

passed to mxFitFunctionGLM(). NA (default) uses OpenMx's rule: 5 for binomial with one latent, else 1.

name

optional name; if NA, model is used.

autoRun

whether to run (default umx_set_auto_run()).

tryHard

xmu_safe_run_summary() tryHard options.

setValues

if TRUE, set start values (means by family; Gaussian residual variances from the data; GLM-item S at 0).

suffix

passed to xmuLabel().

verbose

currently unused; kept for umxRAM-like calling.

Value

an MxModel() (invisibly if autoRun prints a summary)

See Also

umxRAM(), mxFamily(), mxFitFunctionGLM()

Other Advanced Model Building Functions: umx, umxAlgebra(), umxFixAll(), umxJiggle(), umxRun(), umxThresholdMatrix(), umxUnexplainedCausalNexus(), xmuLabel(), xmuValues()

Examples

## Not run: 
set.seed(1)
dat = data.frame(y = rpois(80, lambda = exp(0.3)))
m1 = umxRAM_GLM("poi",
	umxPath("one", to = "y"),
	data = dat,
	families = list(y = poisson()),
	autoRun = TRUE)

## End(Not run)

umx documentation built on Oct. 11, 2026, 5:07 p.m.