Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | André Gyllenram <a_gyllenram@hotmail.com> |
To | <statalist@hsphsun2.harvard.edu> |
Subject | st: Converting a vetor into a matrix |
Date | Mon, 24 Sep 2012 14:20:46 +0200 |
Hello, I have read that in mata you can use rowshape or colshape to convert a vector into a matrix. But it does not seem to work for me. If I have a 9x1 vector and want to convert it to a 3*3 matrix how do I do that? If A is the 9x1 vector and I write: rowshape(A,3) i get this message: "rowshape(): 3103 view found where array required <istmt>: - function returned error" Sorry if this has been asked before but i could not find it. Kind regards André * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/