This function computes the individual counts of the sufficient statistics included in the model.
get_stats(m)
An object of class DEFM.
A matrix with the counts of the sufficient statistics.
data(valentesnsList)
mymodel <- new_defm(
id = valentesnsList$id,
Y = valentesnsList$Y,
X = valentesnsList$X,
order = 1
)
# Adding the intercept terms and a motif from tobacco to mj
term_defm_logit_intercept(mymodel)
term_defm_transition_formula(mymodel, "{y1, 0y2} > {y1, y2}")
# Initialize the model
init_defm(mymodel)
# Get the counts
head(get_stats(mymodel))
#> Logit intercept alcohol Logit intercept tobacco Logit intercept mj
#> [1,] NA NA NA
#> [2,] 0 0 0
#> [3,] 0 0 0
#> [4,] NA NA NA
#> [5,] 1 1 1
#> [6,] NA NA NA
#> Motif {tobacco⁺, mj⁻}⇨{tobacco⁺, mj⁺}
#> [1,] NA
#> [2,] 0
#> [3,] 0
#> [4,] NA
#> [5,] 0
#> [6,] NA