Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: dropping matrix columns


From   altruist81@gmx.de
To   statalist@hsphsun2.harvard.edu
Subject   st: dropping matrix columns
Date   Thu, 12 Dec 2013 17:40:41 +0100 (CET)

 Dear Stata Users,

I am using a loop in which many large matrices are created. I want to use (each of) these matrices to create a single new dataset using the -svmat- command. For each of the matrices many of the column names start with a number AND are the columns empty. Since variable names that start with a number are not allowed -svmat- does not work, i.e. I first need to either change get rid of the first numbers in the column names or delete these columns ( I dont need them).
How can I tell stata to drop all matrix columns for which the name starts with a number OR tell stata to drop all columns in a matrix that are entirely empty?

Many thanks

Darjusch

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index