[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: right shift elements in a matrix
I have a question regarding shifting elements in a row matrix.
After logistic regression (-logit-), I have a parameter matrix e(b).
N=e(df_m)+1 (number of independent variables plus 1)
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,
* For searches and help try: