transprobs<- {efdm}R Documentation

Transition probabilities of an activity

Description

Functions to get or set the transition probabilities of an activity

Usage

transprobs(act) <- value

transprobs(act)

Arguments

act

Activity definition

value

data.frame of transition probabilities

Details

The value should be a data.frame defining the transition probabilities between dynamic variables of the activity. See define_activity for details

Value

data.frame where prob is the transition probability from current state (with suffix 0) to next state (with suffix 1).

Examples

act1 <- define_activity("test", c("vol"))
transprobs(act1) <- data.frame(vol0 = 1:5, vol1=c(2:5, 5), prob=1)
transprobs(act1)

if(require("ggplot2")) {
  ggplot(transprobs(act1)) + geom_raster(aes(x=vol0, y=vol1, fill=prob))
}

[Package efdm version 0.2.1 Index]