You can install the released version of mstate from CRAN with:
install.packages("mstate")
Alternatively, you can install the development version from GitHub:
# devtools::install_github("hputter/mstate")
install.packages("mstate", repos = c('https://hputter.r-universe.dev', 'https://cloud.r-project.org'))