For stata commands(such as npresent, fsum, etc.) without a matrix in the return values(the result of ret list,eret list etc.), how to store the command presentation result table
as a matrix or mata for further operations? I know that we can export the table through log or other commands, and then import the results into stata, and then use commands
such as mkmat to generate matrices, and use functions such as st_data() or st_view() to generate mata.
Is there a universal (the tables generated for various commands is generally applicable), selected (you can choose the corresponding row and column at will), direct (rather than
through a series of steps) command or method to generate Matrix or mata?
For example:
example 1:
i got the tow columns,one is the list of variables, the other is the Non-missing value count,I want turn the tow columns into matrices or mata
example 2:
I got six columns,include Variable, N ,Mean,SD ,Min, Max .Can I get any columns or any rows from the table on the screen into matrices or mata
Need you help,Your reply is a great help to me, Thank you very much
as a matrix or mata for further operations? I know that we can export the table through log or other commands, and then import the results into stata, and then use commands
such as mkmat to generate matrices, and use functions such as st_data() or st_view() to generate mata.
Is there a universal (the tables generated for various commands is generally applicable), selected (you can choose the corresponding row and column at will), direct (rather than
through a series of steps) command or method to generate Matrix or mata?
For example:
example 1:
Code:
npresent a b c
example 2:
Code:
fsum a b c
Need you help,Your reply is a great help to me, Thank you very much
Comment