Structure change with transition matrix

 

We continue to consider

 

for a common matrix

 

but we change thetafs across groups.

 

We set bigger matrix thetas by merging thetafs vertically. That is,

 

 

when we have ns groups. Each  is dim x 1 vector.

 

There are dim x ns numbers of elements in thetas in total.

 

We pick every dim numbers of rows in thetas in the program.