Learn R Programming

DySeq (version 0.13)

EstFreq: EstFreq

Description

Simulates k state-transition tables (see: StateTrans) based one state-transtion table containing expected population frequencies (relative frequencies!). If simulations should be conducted for different numbers of time intervalls, please see: EstTime

Usage

EstFreq(x, t, min.cell = 5, k = 20000)

Arguments

x
a matrix containing the assumed probabilities for the expected transition tables
t
number of time intervalls
min.cell
a single integer defines what counts as a low frequency (5 by convention)
k
Number of simulations (at least 20.000 is recommended)

Details

The matrix must have 2*4 dimensions with the following information:
  • First column represents if behavior of interest is shown
  • Second column represents if behavior of interest is not shown
  • First row shows if behavior of interest was shown by both partners in the previous time interval
  • Second row shows if behavior of interest was shown only by the partner in the previous time interval
  • Third row shows if behavior of interest was shown only by the actor in the previous time interval
  • Second row shows if behavior of interest was not shown in the previous time interval

Examples

Run this code
## Not run: 
# my.trans.table<-matrix(c(0.57, 0.13,0.05,0.05,0.05, 0.05,0.05,0.05),4,2)
# 
# my.cellproblems<-EstFreq(my.trans.table, 100, 5, k=20000)
# 
# my.cellproblems
# ## End(Not run)

Run the code above in your browser using DataLab