Learn R Programming

defm (version 0.1-1)

get_stats: Get sufficient statistics counts

Description

This function computes the individual counts of the sufficient statistics included in the model.

Usage

get_stats(m)

Value

A matrix with the counts of the sufficient statistics.

Arguments

m

An object of class DEFM.

Examples

Run this code
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))

Run the code above in your browser using DataLab