Hello, I am new to Mata and how do you count the number of rows and columns of a non-null values in matrix. Of course, We can exchange rows and columns, so at least columns or rows non-empty number can be calculated.lots of command can get the results,but i should do this by matrix or mata. Thank you very much for example T=(1,1,4, . \ 2,2,5,12 \ 3,3,6,13 \ 4, . ,7,11 \ 5,5,8,. \ 6,6,9,18 \ 7,7,., 20 \ 8,8, . ,21 \ 9,9,12,23 \ 10,10,13, .) the wanted matrix should be as follow: wanted = (10,9,8,7) the number of the wanted matrix represent the number of non-null values in each column.
Related Posts with How to count the number of rows and columns of a non-null values in matrix?
Too Many ValuesHi all, I'm working with a dataset with around 350.000 rows and 20 columns. When I try to encode so…
How can I omit one factor variable from log file?Hello everyone! I have a log file of regress with factor (categorical) variable (i.variable). This f…
Using Wordscore in STATA to assess trends in press releasesI'm new to the forum, but I was told I might get some help here. I'm doing an MA in political scien…
Help with event studyHello everyone, I am conducting some type of event study related to political elections in several c…
Overlay non-twoway graphsHi Statalisters, I would like to overlay two non-twoway type graphs - e.g., graph dot and graph hba…
Subscribe to:
Post Comments (Atom)
0 Response to How to count the number of rows and columns of a non-null values in matrix?
Post a Comment