Overview

Overview of the package

datafsm

datafsm: A package for estimating FSM models.

High-level functions

These are the functions you will use most of the time

evolve_model()

Use a Genetic Algorithm to Estimate a Finite-state Machine Model

evolve_model_cv()

Estimate Optimal Number of States of a Finite-state Machine Model

evolve_model_ntimes()

Use a Genetic Algorithm to Estimate a Finite-state Machine Model n-times

FSM methods

Class methods for ga_fsm object

print(<ga_fsm>) show(<ga_fsm>) summary(<ga_fsm>) plot(<ga_fsm>,<ANY>) barplot(<ga_fsm>) dotchart(<ga_fsm>) estimation_details(<ga_fsm>) best_performance(<ga_fsm>) varImp(<ga_fsm>) action_vec(<ga_fsm>) states(<ga_fsm>) predict(<ga_fsm>)

An S4 class to return the results of using a GA to estimate a FSM with evolve_model.

Model Diagnostics

Assessing the performance of models generated by this algorithm

performance()

Measure Model Performance

best_performance()

Extracts performance

varImp()

Extracts slot of variable importances

compare_fsm()

Compares FSMs

degeneracy_check()

Determines if State Matrix is Degenerate for Given Data Set.

Data sets

Data sets included in the package

NV_games

Empirical prisoner's dilemma games from Nay and Vorobeychik

Details

Functions for dealing with the details of data wrangling, fitting models, and extracting data from fitted models

add_interact_num()

Add interaction numbers for panel data

states()

Extracts number of states

action_vec()

Extracts slot of action_vec

find_wildcards()

Find Indices for Non-identifiable Elements of State Matrix.

estimation_details()

Extracts slot relevant to estimating the fsm

fitnessCPP()

Fitness Function in C++

var_imp()

Variable Importance Measure for A FSM Model

build_bitstring()

Builds Bitstring

decode_action_vec()

Decodes Action Vector

decode_state_mat()

Decodes State Matrix