coefs: Tidy coefficients from a fitted mlvar model

View source: R/mlvar.R

coefs.idioml_resultR Documentation

Tidy coefficients from a fitted mlvar model

Description

Generic accessor for the tidy coefficient table stored on a fit_mlvar() result. Returns a data.frame with one row per ⁠(outcome, predictor)⁠ pair and columns outcome, predictor, beta, se, t, p, ci_lower, ci_upper, significant.

Usage

## S3 method for class 'idioml_result'
coefs(x, ...)

coefs(x, ...)

## S3 method for class 'net_mlvar'
coefs(x, ...)

## Default S3 method:
coefs(x, ...)

## S3 method for class 'net_mlvar_bayes'
coefs(x, ...)

## S3 method for class 'net_usem'
coefs(x, ...)

## S3 method for class 'var_result'
coefs(x, ...)

## S3 method for class 'var_bayes_result'
coefs(x, ...)

## S3 method for class 'gvar_result'
coefs(x, ...)

## S3 method for class 'net_gimme'
coefs(x, ...)

## S3 method for class 'var_list'
coefs(x, ...)

## S3 method for class 'gvar_list'
coefs(x, ...)

Arguments

x

A fitted model object — currently only net_mlvar is supported.

...

Unused.

Details

Only the within-person (temporal) coefficients are tabulated — these are the lagged fixed effects that populate fit$temporal. The between-subjects effects that go into fit$between are handled via the D (I - Gamma) transformation and are not exposed as a separate tidy table.

Value

A tidy data.frame of coefficient estimates.

Examples



set.seed(1)
n_id <- 8; n_t <- 30; vars <- c("A", "B", "C")
rows <- lapply(seq_len(n_id), function(i) {
  m <- as.data.frame(matrix(rnorm(n_t * 3), ncol = 3))
  names(m) <- vars
  m$id <- i; m$day <- 1L; m$beep <- seq_len(n_t)
  m
})
d <- do.call(rbind, rows)
fit <- fit_mlvar(d, vars = vars, id = "id", day = "day", beep = "beep")
print(fit)
summary(fit)



idiographic documentation built on Aug. 4, 2026, 1:07 a.m.