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?
Multicollinearity in simple diference-in-differences modelHi All, I have a simple 2-period panel data and I am trying to run a difference-in-differences model…
Dropping all observations from a subgroup if a variable of only or more of them is negativeHi there, I'm trying to drop all observations from a subgroup if a variable of only or more of them…
Linear Regression or Panel RegressionHello I just read a paper and would like to try to replicate it. However, I don't exactly understan…
Creation of New Variable from Long VariableHello Everyone, I am currently working on a "long" variable of 9 digits and want to make a new vari…
Using detring to remove special charactersHi all, I'm trying to remove special characters from a string variable. I have two variables. One c…
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