I am trying to make a 2 rows, 3 columns table using esttab. Every item/observation in this table should show 2 numbers from previously calculated matrices separated by commas and the table should be produced in Latex. I am using the following commands on Stata but not getting the desired result (meanvec, meanvec1, meanvec2, meanvec3, meanvec4 and meanvec5 are matrices with 1 row and 2 columns and store results after running a program and a loop 1000 times):
mat Sigma1 = [meanvec[1,1], meanvec[1,2] \ meanvec3[1,1], meanvec3[1,2]]
mat Sigma2 = [meanvec1[1,1],meanvec1[1,2] \ meanvec4[1,1],meanvec4[1,2]]
mat Sigma3 = [meanvec2[1,1],meanvec2[1,2] \ meanvec5[1,1],meanvec5[1,2]]
mat Simulation = [Sigma1, Sigma2, Sigma3]
mat colnames Simulation= "Sigma1" "Sigma2" "Sigma3"
mat rownames Simulation="N=50" "N=1000"
esttab m(Simulation, fmt(%9.2f)) using "${home}/tables/matrix1.tex", replace title(MSE Simulations) nomtitles booktabs
I am new to Stata and any help would be appreciated. Thanks!
Related Posts with Making Tables from Matrices using esttab
System GMM across subsamplesHello everyone, I am using the -xtabond2- command. I am using 70 countries over a period of 14 years…
Adding Log-rank test p-value to the Kaplan Meier graphHello everyone, I am trying to add Log-rank test p-value to my Kaplan Meier graph, but I cannot fin…
Potential bug in IVREGRESS: instruments dropped due to collinearity when they should not be droppedIn a private conversation, haiyan lin notified me of a potential bug in ivreg2. The same problem occ…
Test difference between estimated coefficientsHello, I am running a regression on two subsamples (s2=0 and s2=1). I would like to test whether th…
Number format: only display digits if non-intengerI let STATA display summary statistics for me using esttab, as follows: Code: sysuse auto, clear …
Subscribe to:
Post Comments (Atom)
0 Response to Making Tables from Matrices using esttab
Post a Comment