[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Sascha Robert <sascha.robert@iew.unizh.ch> |

To |
STATA List <statalist@hsphsun2.harvard.edu> |

Subject |
st: Another reshaping problem |

Date |
Fri, 15 Apr 2005 10:54:46 +0200 |

Hi

...and sorry to hassle you again with a ridiculous problem. A teacher once told me: 'There are no dumb questions!', though. Well, there are, as the protagonists of 'Simple Life' have evidenced, and nontheless I try it:

My data in short:

group var strategy

1 11 0

1 12 1

1 13 0

1 14 1

2 15 0

2 16 1

If the first two rows would be omited,

. reshape wide var, i(group) j(strategy)

would do the trick. The problem is, using all observations, that multiple observations within 'group' share the same 'strategy'.

My data, after the reshaping, should look like this:

group var0 var1

1 11 12

1 13 14

2 15 16

Note that my data is in a form that would not produce missing values in 'var0' and 'var1' (within a 'group' there is always an equal share of 'strategy' = 0 and 'strategy' = 1).

Can anybody help? Thankyou.

Sascha

--

***** sascha robert | mailto: sascha.robert@iew.unizh.ch *****

*

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

**Follow-Ups**:**Re: st: Another reshaping problem***From:*Seb Buechte <sfbuechte@gmail.com>

- Prev by Date:
**st: RE: cond(x,a,b,c) function** - Next by Date:
**st: help with output** - Previous by thread:
**st: RE: cond(x,a,b,c) function** - Next by thread:
**Re: st: Another reshaping problem** - Index(es):

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