Learn R Programming

lame (version 1.3.4)

tidy.ame_als: Tidy method for fitted ame_als / lame_als objects

Description

Returns a data frame with one row per regression coefficient, compatible with the broom idiom, so that ALS fits compose with modelsummary / kableExtra pipelines next to MCMC fits. Standard errors come from the sandwich covariance (vcov.ame_als) by default, or from the bootstrap object attached to x$bootstrap when present (preferred, fully propagated). statistic is estimate / std.error; p.value is the Normal-approximation two-sided tail \(2(1 - \Phi(|z|))\) from the bootstrap or sandwich standard error. It is a Wald-style summary for the point estimator, not a posterior probability.

Usage

# S3 method for ame_als
tidy(x, conf.int = TRUE, conf.level = 0.95, ...)

# S3 method for lame_als tidy(x, conf.int = TRUE, conf.level = 0.95, ...)

Value

Data frame with columns term, estimate, std.error, statistic, p.value, conf.low, conf.high, plus a se_source column recording "bootstrap" or "sandwich".

Arguments

x

A fitted ame_als / lame_als object.

conf.int

Logical; include conf.low / conf.high columns. Default TRUE.

conf.level

Confidence level. Default 0.95.

...

Passed to vcov.ame_als (e.g. cluster = "dyad").

Details

Only the intercept and dyadic-covariate coefficients are returned, matching coef(fit) on the sandwich-covered subset. Additive (a, b), multiplicative (U, V), and node-covariate parameters are not included; use ame_als_bootstrap and inspect the bootstrap object directly if you need them.

Examples

Run this code
# \donttest{
data(YX_bin_list)
Y1 <- 1 * (YX_bin_list$Y[[1]] > 0); diag(Y1) <- NA
fit <- ame_als(Y = Y1, Xdyad = YX_bin_list$X[[1]],
               family = "binary", R = 1, verbose = FALSE)
tidy(fit)
# }

Run the code above in your browser using DataLab