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: STATA Pivot capability


From   "JVerkuilen (Gmail)" <[email protected]>
To   [email protected]
Subject   Re: st: STATA Pivot capability
Date   Sun, 10 Feb 2013 10:33:04 -0500

On Fri, Feb 8, 2013 at 10:51 PM, Michael Stewart
<[email protected]> wrote:
> Hello,
>
> I am trying to find if Stata can import/export data  from/to excel in
> the form of pivot table for excel.
> Can anyone help me .

If you would explain what the pivot table is that would help. I seem
to recall it's a cross tab (like what Stata generates with
-tabulate-), with rows and columns being categories of a nominal
variable such as occupation by state. If so Stata "prefers" to have
these represented differently. If the pivot was:

       A1  A2    A3
B1   x11 x12  x13
B2   x21 x22  x23
B3   x31 x32  x33

Stata would really prefer you lay out the data as:

A    B   X
1    1    x11
1    2    x21
1    3    x31
2    1    x21
2    2    x22
2    3    x23
3    1    x31
3    2    x32
3    3    x33

But it depends a lot on what you intend to do with the data.
*
*   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