Hi all,
I'm doing sequence analysis, trying to understand patterns for a series of firms across time. I'm using the latest update of the sq package, in Stata 14, and my data have been declared a sqset. I am able to do descriptive stuff (ie sqdes) with no trouble. I can also run sqom successfully with no options, or as sqom, subcost(rawdistance).
But, when conducting the OM, I really want to use the inverse of transition probabilities. I have calculated these in a matrix I call Pinv, which is a symmetrical 7x7 matrix - corresponding to the 7 'states' my firms can be in at any particular time. I'm attaching a screenshot of the matrix, since it looks bad if I just copy and paste it into the text window.
The problem arises when I run the following:
sqom, subcost(Pinv)
I get the following error:
subcostmatrix invalid: subcostmatrix is not symmetric
r(198);
I am confused, since my matrix clearly is symmetric, and contains the right number of elements. Any advice?
Just for fun, I also tried the following:
sqom, subcost(meanprobdistance)
This also returns an error:
needlemanwunschexactmatrix(): 3200 conformability error
sqomref(): - function returned error
<istmt>: - function returned error
Any help figuring out what is going on would be very much appreciated.
Many thanks,
Tom
I'm doing sequence analysis, trying to understand patterns for a series of firms across time. I'm using the latest update of the sq package, in Stata 14, and my data have been declared a sqset. I am able to do descriptive stuff (ie sqdes) with no trouble. I can also run sqom successfully with no options, or as sqom, subcost(rawdistance).
But, when conducting the OM, I really want to use the inverse of transition probabilities. I have calculated these in a matrix I call Pinv, which is a symmetrical 7x7 matrix - corresponding to the 7 'states' my firms can be in at any particular time. I'm attaching a screenshot of the matrix, since it looks bad if I just copy and paste it into the text window.
The problem arises when I run the following:
sqom, subcost(Pinv)
I get the following error:
subcostmatrix invalid: subcostmatrix is not symmetric
r(198);
I am confused, since my matrix clearly is symmetric, and contains the right number of elements. Any advice?
Just for fun, I also tried the following:
sqom, subcost(meanprobdistance)
This also returns an error:
needlemanwunschexactmatrix(): 3200 conformability error
sqomref(): - function returned error
<istmt>: - function returned error
Any help figuring out what is going on would be very much appreciated.
Many thanks,
Tom
Comment