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?
Combining Cox Proportional Hazards model and Difference-in-DifferencesDear All, My question concerns whether it is possible to combine a Cox proportional hazards model w…
Flexible Regression Specification for Panel DataDear Stata community, I am currently looking to estimate a somewhat complex regression model to ana…
A question from an absolute beginner: hospitalization dataHi everybody. I have a set of hospital discharge records (time window 2001-2016) with the main diagn…
Matching observations across years for same idHi Forum, I am struggling with something very silly but would be very helpful if someone could help…
change in sign and significance of linear term after adding quadratic and cubic termsHi all, I need your comments on change in sign and significance of linear term after adding quadrat…
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