March 2019
Beginner to intermediate
448 pages
13h 14m
English
The depmixS4 package assumes by default that the unobserved states are governed by a multinomial model. This means that, in principle, the transition probability between two states, s1 and s2, depends on the current state s1. This can be extended using the transition= option and specifying covariates for those transitions.
Let's suppose that we now observe another variable called machinery_road that flags whether machinery/equipment was seen on the same day around the area. It's likely that whenever the station is closed, maintenance is going to be done on it. In consequence, whether we see machinery around the station should help explain the transition between open and closed and vice versa:
data = read.csv("./subway_data_extended.csv") ...Read now
Unlock full access