Hello
Pretty new to mata and trying to exploit its string matrix capabilities. Not getting far though.
Probably very simple questions for the listers:
1. Importing a scalar from stata to mata using
d=st_local("e(cmd)") // where e(cmd) is a macro from a tabulate estimation command in stata with the contents"tabulate"
This doesn't work and tips on the syntax or method much appreciated
2. Using the content of "d" (once successfully imported) to create a vector with n rows with identical contents.
eg
1
1 tabulate
2 tabulate
3 tabulate
4 tabulate
5 tabulate
6 tabulate
Ultimately I want the number of rows to equal the number of estimates in the e(b) matrix for any given tabulate command.
Answers to any part or all of the above greatly appreciated. There is just not enough examples of these commands in the mata manual or anywhere else for that matter. I reckon it must be simple syntax errors that don't appear as errors but I just don't know.
Thankyou
Darren
Pretty new to mata and trying to exploit its string matrix capabilities. Not getting far though.
Probably very simple questions for the listers:
1. Importing a scalar from stata to mata using
d=st_local("e(cmd)") // where e(cmd) is a macro from a tabulate estimation command in stata with the contents"tabulate"
This doesn't work and tips on the syntax or method much appreciated
2. Using the content of "d" (once successfully imported) to create a vector with n rows with identical contents.
eg
1
1 tabulate
2 tabulate
3 tabulate
4 tabulate
5 tabulate
6 tabulate
Ultimately I want the number of rows to equal the number of estimates in the e(b) matrix for any given tabulate command.
Answers to any part or all of the above greatly appreciated. There is just not enough examples of these commands in the mata manual or anywhere else for that matter. I reckon it must be simple syntax errors that don't appear as errors but I just don't know.
Thankyou
Darren
Comment