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: How to determine if a variable is a dummy in mata


From   Paul Corral <[email protected]>
To   [email protected]
Subject   st: How to determine if a variable is a dummy in mata
Date   Sat, 16 Nov 2013 23:23:43 -0500

Hello all,

I'm been trying to determine if a variable is a dummy or not within mata.

Is there an easy way to do this without iterating over each row of a
matrix's column and check if it is either 0 or 1. I was trying to use
the allof() command, however it can only check if all are a scalar.
So, while I may check if all are ones, it won't allow me to check if
all are 0 or 1.

Thanks,

Paul Corral
*
*   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