Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: SV: AW: Output from tabulate to a matrix


From   "Tomas Lind" <[email protected]>
To   <[email protected]>
Subject   st: SV: AW: Output from tabulate to a matrix
Date   Thu, 21 Jan 2010 14:29:44 +0100

Tanks Martin, it works fine.

Another question.

Is it possible to store names in a matrix for example "east", "west",
"north", "south" and then display the one that I want, for example the 3:rd
element "north"?

/Tomas




-----Ursprungligt meddelande-----
Från: [email protected]
[mailto:[email protected]] För Martin Weiss
Skickat: den 21 januari 2010 14:07
Till: [email protected]
Ämne: st: AW: Output from tabulate to a matrix


<> 

Those two missing column totals should read "4500" and "1000", I guess.
Ben`s -ssc d estout- may be helpful for you:


*************
webuse nhanes2b, clear

capture which estout
if _rc ssc install estout

estpost svy: tab race diabetes, col
mat l e(row)
di _b[Total:White]
di _b[Total:Black]
di _b[Total:Other]
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Tomas Lind
Gesendet: Donnerstag, 21. Januar 2010 13:26
An: [email protected]
Betreff: st: Output from tabulate to a matrix

Hi listers,

This syntax-

svy : tabulate area  kon , count

produces a table like this (with 4 rows shown (fake data)).

area  men    women   Total
--------------------------
aa    1200    1300    2500
bb    1100     900    2000
cc		4500		
dd		1000
--------------------------
Total                10000  
Key:  weighted counts


Is it possible to divide all rowtotals with "totaltotal" (10000) and store
all these values in a matrix for later use? 

How can I display a specific element of the stored values?


Yours

Tomas   

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index