| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: Re: transposing rows
Matiarosaria,
when using -xpose- for your data you should note that
- the column that holds the variable names needs to be named _varname
(otherwise the transposed variables will be named v1, v2, v3,...and
you will loose the original/intended variable names
- string variables may not be transposed as -xpose- creates all
variables with the default storage type - either float or double.
Best regards
Sebastian
On 3/7/07, [email protected] <[email protected]> wrote:
Thank you Sergiy and Neil for your answers, as Neil points out I need to use
STATA as I have too many variables!
Best
Matiarosaria
Citazione Neil Shephard <[email protected]>:
> Personally I wouldn't trust Excel for data management (or anything
> else for that matter).
>
> Stata can handle this for you, and doesn't have the 256 variable
> limits (although there are limits imposed depending on the flavour of
> Stata you are using). Save the Excel sheet as .csv and -insheet- it
> into Stata. Then use the -xpose- command to transpose your data (see
> -man xpose-).
>
> For future reference using the -findit- command (or indeed -search-)
> to look for help on a given topic would have lead you to this
> solution.
>
> Neil
>
> On 3/7/07, Sergiy Radyakin <[email protected]> wrote:
> > Hi,
> >
> > If your data are stored in Excel, you can transpose it in Excel -- copy,
> > paste special, choose transpose as an option, done.
> > Note that you are limited to 256 variables though (A,B,...,IV)
> >
> > Best regards,
> > Sergiy
> >
> > ----- Original Message -----
> > From: <[email protected]>
> > To: <[email protected]>
> > Sent: Wednesday, March 07, 2007 11:11 AM
> > Subject: st: transposing rows
> >
> >
> > >
> > > Dear all,
> > > my data are stored in an excel file where each row contains a variable
> and
> > > each column represents a year, as follows:
> > >
> > >
> > > 1994 1995 1996 1997
> > >
> > > TOTAL SALES 844854 949870 956692 876844
> > > DEPRECIATION NA 38477 39937 36588
> > > DEPN NA NA NA NA
> > > OPERATING PROFIT 52971 93029 93613 112022
> > >
> > >
> > > I need to transpose the rows so that each variable is contained in a
> > > column
> > > and each row represents a year. In other words I need to get:
> > >
> > > TOTAL SALES DEPRECIATION DEPN OPERATING PROFITS
> > > 1994
> > > 1995
> > > 1996
> > > 1997
> > >
> > >
> > >
> > > Does anyone know how STATA can do it?
> > > Thanks for your help
> > >
> > > Mariarosaria
> > >
> > >
> > >
> > > -------------------------------------------------
> > > This mail sent through IMP: http://horde.org/imp/
> > >
> > > *
> > > * For searches and help try:
> > > * http://www.stata.com/support/faqs/res/findit.html
> > > * http://www.stata.com/support/statalist/faq
> > > * http://www.ats.ucla.edu/stat/stata/
> >
> > *
> > * For searches and help try:
> > * http://www.stata.com/support/faqs/res/findit.html
> > * http://www.stata.com/support/statalist/faq
> > * http://www.ats.ucla.edu/stat/stata/
> >
>
>
> --
> "Every great advance in natural knowledge has involved the absolute
> rejection of authority." - Thomas H. Huxley
>
> Email - [email protected] / [email protected]
> Website - http://slack.ser.man.ac.uk/
> Photos - http://www.flickr.com/photos/slackline/
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/