Debian Codegraph @

man/tidy.btergm.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/btergm.R
3 \name{tidy.btergm}
4 \alias{tidy.btergm}
5 \alias{btergm_tidiers}
6 \title{Tidy a(n) btergm object}
7 \usage{
8 \method{tidy}{btergm}(x, conf.level = 0.95, exponentiate = FALSE, ...)
9 }
10 \arguments{
11 \item{x}{A \code{\link[btergm:btergm]{btergm::btergm()}} object.}
12
13 \item{conf.level}{Confidence level for confidence intervals. Defaults to
14 0.95.}
15
16 \item{exponentiate}{Logical indicating whether or not to exponentiate the
17 the coefficient estimates. This is typical for logistic and multinomial
18 regressions, but a bad idea if there is no log or logit link. Defaults
19 to \code{FALSE}.}
20
21 \item{...}{Additional arguments. Not used. Needed to match generic
22 signature only. \strong{Cautionary note:} Misspelled arguments will be
23 absorbed in \code{...}, where they will be ignored. If the misspelled
24 argument has a default value, the default value will be used.
25 For example, if you pass \code{conf.lvel = 0.9}, all computation will
26 proceed using \code{conf.level = 0.95}. Two exceptions here are:
27 \itemize{
28 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
29 it will be ignored.
30 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
31 will be ignored.
32 }}
33 }
34 \description{
35 Tidy summarizes information about the components of a model.
36 A model component might be a single term in a regression, a single
37 hypothesis, a cluster, or a class. Exactly what tidy considers to be a
38 model component varies across models but is usually self-evident.
39 If a model has several distinct types of components, you will need to
40 specify which components to return.
41
42 This method tidies the coefficients of a bootstrapped
43 temporal exponential random graph model estimated with the \pkg{xergm}.
44 It simply returns the coefficients and their confidence intervals.
45 }
46 \examples{
47 \dontshow{if (rlang::is_installed(c("btergm", "network"))) withAutoprint(\{ # examplesIf}
48
49 library(btergm)
50 library(network)
51
52 set.seed(5)
53
54 # create 10 random networks with 10 actors
55 networks <- list()
56 for (i in 1:10) {
57 mat <- matrix(rbinom(100, 1, .25), nrow = 10, ncol = 10)
58 diag(mat) <- 0
59 nw <- network(mat)
60 networks[[i]] <- nw
61 }
62
63 # create 10 matrices as covariates
64 covariates <- list()
65 for (i in 1:10) {
66 mat <- matrix(rnorm(100), nrow = 10, ncol = 10)
67 covariates[[i]] <- mat
68 }
69
70 # fit the model
71 mod <- btergm(networks ~ edges + istar(2) + edgecov(covariates), R = 100)
72
73 # summarize model fit with tidiers
74 tidy(mod)
75 \dontshow{\}) # examplesIf}
76 }
77 \seealso{
78 \code{\link[=tidy]{tidy()}}, \code{\link[btergm:btergm]{btergm::btergm()}}
79 }
80 \value{
81 A \code{\link[tibble:tibble]{tibble::tibble()}} with columns:
82 \item{conf.high}{Upper bound on the confidence interval for the estimate.}
83 \item{conf.low}{Lower bound on the confidence interval for the estimate.}
84 \item{estimate}{The estimated value of the regression term.}
85 \item{term}{The name of the regression term.}
86
87 }