Dear, All,
just wanted to confirm with you whether there exists a built-in function in Mata to calculate the equivalent of python's count_nonzero(), which reports the number (count) of the elements of a matrix that are different from zero.
No problem implementing this with nested loops. Just looking for a built-in function if available.
Thank you, Sergiy
Related Posts with Equivalent of count_nonzero()
marginal results for melogitI am modeling a proportion (numerator/denominator where the denominator represents the number of tri…
Question about using if flag + tab togetherHi all, I am trying to create a Table 1 using Medicare claims to compare demographics among people …
Trouble plotting standard deviation - Sigma convergenceHi, I am new to Stata and have been trying to plot the standard deviation of my whole sample and th…
Graph combine formattingDear All, I am trying to combine coefficient plots from 3 different regressions. My data looks as f…
Counting unique observations in a complicated data structureDear Statalist, I have a panel data on the level of towns and their administrative parts. Each town…
Subscribe to:
Post Comments (Atom)
0 Response to Equivalent of count_nonzero()
Post a Comment