Hi,
I have two variables for which I use the sum command to aggregate the values, so I end-up with two numbers. I want to export these two results so I use the matrix function. I also want to divide these two results together and export the result too. It is here that I have a problem. I do not find how to proceed for the division.
I have the following code :
Code:
.estpost tabstat VARIABLE1 if year == 2008, statistics(sum)
.esttab, wide nonumber cell("sum(label(Total Variable1 in 2008))")
.mat II = e(sum)'
.estpost tabstat VARIABLE2 if year == 2008, statistics(sum)
.esttab, wide nonumber cell("sum(label(Total Variable2 in 2008))")
.mat JJ = e(sum)'
.putexcel set "name.xlsx", replace
.putexcel A3 = "2008"
.putexcel B3 = matrix(II)
.putexcel C3 = matrix(JJ)
Thank you in advance.
David
Related Posts with matrix division
RESET testHi, How can I run the RESET test for a gravity model with pair-fixed effects?: ppmlhdfe TRADE RTA …
Pie graph with missing values in spmapHi all, I wonder if its possible get a graph pie in blank if exist missing value in the data, examp…
Data interpretationHelp please with interpretation. Code: xtpcse ta rank score b safety health human ict prioritizatio…
Help in Fama McBeth regressionHi, I'm working on fund performance persistence. I want to run a Fama McBeth regression using marke…
Please help in codingDear all, I tried to code ethnic group but have difficulty. Survey question-What is your ethnicity?,…
Subscribe to:
Post Comments (Atom)
0 Response to matrix division
Post a Comment