Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: Table output from three variables


From   Haluk Vahaboglu <[email protected]>
To   "[email protected]" <[email protected]>
Subject   RE: st: Table output from three variables
Date   Fri, 26 Jul 2013 23:08:56 +0000

Nick Sergiy,
Thank you both for immediate reply.
Sergiy I intent "Table output".
Nick thanks after dropping missing observations [iw] worked nicely.

Haluk Vahaboğlu




----------------------------------------
> Date: Fri, 26 Jul 2013 23:59:27 +0100
> Subject: Re: st: Table output from three variables
> From: [email protected]
> To: [email protected]
>
> In the thread you quote the use of [aw] was arbitrary. Did you try
> [fw] or [iw]?
>
> Nick
> [email protected]
>
> On 26 July 2013 23:35, Haluk Vahaboglu <[email protected]> wrote:
>
>> I am using Stata 12.1 for Linux 64 bit.
>> I want to get a table from three variables, using one as row other as column and the third as the element of the matrix (table).
>> Data is something like:
>> Compound Year Amount
>> X 2009 5
>> X 2010 9
>> X 2011 2
>> Y 2009 3
>> Y 2011 8
>> want to get a table as:
>> . 2009 2010 2011
>> X 5 9 2
>> Y 3 . 8
>>
>> This might be achieved via the "reshape wide.." command but could this be also possible without reshaping the data?
>> I cannot find an exact answer to my problem in help files, manuals, FAQ (there is one without an exact solution to my problem) and google search.
>> To a similar thread by AJ Medwick (http://www.stata.com/statalist/archive/2009-05/msg00337.html) Nick J Cox posted a solution"tab var1 var2 [aw=var3], matcell(matrix)" that gives an output which is not what I want.
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index