5.16 Optional exercise

Please write R code to estimate G-DINA model using EM algorithm or MCMC. Analyze data2 and Q2 using your code and compare your results with those from the GDINA package.