transprobs<- {efdm} | R Documentation |
Functions to get or set the transition probabilities of an activity
transprobs(act) <- value
transprobs(act)
act |
Activity definition |
value |
|
The value
should be a data.frame
defining the transition probabilities
between dynamic variables of the activity. See define_activity
for details
data.frame
where prob is the transition probability from current
state (with suffix 0) to next state (with suffix 1).
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))
}