Hello,
I have a question regarding shifting elements in a row matrix.
After logistic regression (-logit-), I have a parameter matrix e(b).
Let
matrix b=e(b)
N=e(df_m)+1 (number of independent variables plus 1)
we have
b[1,1] b[1,2] ... b[1,N]
I want to generate a new matrix with the same elements but different order
(shift one element right), that is,
b[1,N], b[1,1], b[1,2], ..., b[1, N-1]
I tried to use -svmat- to convert matrix into N variables but I don't know
how to combine them into a new matrix when N is not fixed for each run (In
fixed N, the matrix can be generated by -mkmat-). Is there anyone who can
help me with this shift operation?
Thanks a lot,
Lei
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/