Hello, I need your help on matrix and Excel in Stata.
I have a matrix m and would like to stack its columns, making it a column vector and then output it to excel. How may I do it? I got an error message but do not know how to proceed. Your help is highly appreciated.
mata
m1 = colshape(st_matrix("m"), 1)
end
getmata m1
export excel using test.xlsx, replace
putexcel set results211117.xlsx, sheet(a, replace) modify
This is my matrix m (The column names are 0, 1, 2,......8)
. matrix list m
m[10,9]
0 1 2 3 4 5
bxxxxxxx .52266514 .58911588 .83552992 .56056369 .8199342 .7093596
pxxx 3.732e-17 4.505e-07 1.945e-11 8.223e-08 .00003257 2.086e-37
pyyy 7.988e-15 .00036929 .16934102 .00002184 .35435738 3.141e-09
impoxxxxxxxx .69417235 .97630077 1.0495413 .75846318 1.0857929 1.010838
pxxx .00005891 3.303e-10 1.661e-06 .00010401 5.796e-06 1.058e-06
pyyy .07332287 .87432756 .81737478 .21084674 .71513743 .95735001
impoaaaaaaaa .35782885 .18078305 .57813267 .31135534 .46354425 .39562263
pxxx .11893438 .47588783 .00996288 .25309767 .14475445 .06826691
pyyy .00535643 .00136421 .05931852 .01186249 .09168185 .00553321
pxxxxxxxxxx .38558787 .02224672 .18134953 .28309624 .12058027 .13453773
.........
Related Posts with convert a matrix to a column vector, and then output it to Excel file
upper bound of confidence interval not providedHello, i am using STATA 16 and i am trying to calculate median survival with the stci command. i ca…
conformability 503 error in tab commandHello, I am trying to do chi2 tests and store the chi2, p, and the frequencies with the following co…
How to estimate the marital status (Married and widowed) using the information on the Relationship of person to household headHello, everyone I am having a cross-sectional data on the relationship of person to household head. …
Plot number of events per month, over time (simple)Hi Folks. Sorry Stata beginner here, but wondered if others had a good approach to what I am trying …
Wilcoxon Rank Sum Test between countriesHello everyone, I was talking to my supervisor and he asked me to do a Wilxoxon ranksum test for my…
Subscribe to:
Post Comments (Atom)
0 Response to convert a matrix to a column vector, and then output it to Excel file
Post a Comment