Statalist


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

st: RE: Dataset reorganization


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Dataset reorganization
Date   Thu, 5 Feb 2009 17:55:02 -0000

It's a -reshape- from wide to long. 

Nick 
[email protected] 

Diego Bellavia

I have a dataset with around 300 variables. 
These variables are all "segments" of different "levels". Basically I
have something lik

                
 ID                             basal_lat middle_lat apex_lat
Observation1
Observation2
...


so that lat is for "lateral" and basal, middle and apex are the levels. 
I would like to compare the observations by the different levels so that
I should end up with something like: 

groups_segments    ID                  Lateral wall
1                            Obs1              numeric Value (Bas)
1                            Obs2              numeric Value (Bas)
2                            Obs2              num (Mid)
2                            Obs2              num (Mid)
3                            Obs1              num(Apex)
3                            Obs1              num(Apex) 

then I could compare the groups by level, with a simple oneway ANOVA, is
that correct ?

Now, is there any quick ay to reorganize the dataset with STATA, instead
of doing that manually ? 

*
*   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