Overall code to show an example to estimate models proposed in: Pennoni, F. Genge E. (2019). Analysing the course of public trust via Hidden Markov Models: a focus on the Polish society. Statistical Methods & Applications, 28, https://doi.org/10.1007/s10260-019-00483-9
The files are the following:
- dtwc.Rdata: contains an example of the data used for the analysis: id, col (time), X are covariates and Y responses, ww are the sampling weights.
- Code_Course_of_Public_Trust1.R: to estimate the proposed Hidden Markov models