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

Re: st: from long to wide

From   Maarten buis <>
Subject   Re: st: from long to wide
Date   Wed, 31 Oct 2007 12:55:56 +0000 (GMT)

--- wrote:
> How to reshape a data set from long form to wide form without using
> the command reshape?
> Say the data look like this
> HID       PID      INJDAM
> A           1           a
> A           2           b
> A           2           c
> B           1           b
> B           2           a
> where HID and PID represent household and personal ids respectively,
> and INJDAMC the damage type (eg, a=burns, b=bruising, c=..)in a
> personís most recent injury.
> (Recently I am working on a data set from a remote access data
> library. The RADL receives STATA codes submitted by its users, it
> runs jobs and returns outputs via its web interface.  For
> confidentiality reasons, not all the STATA commands are allowed in
> the RADL. One of these commands is reshape,  we know reshape a
> dataset wonít reveal extra information though. I tried to program
> but failed.  )

If that example is correct than "-reshape- not working" may not be due
to -reshape- not being allowed but due to the fact that PID is not
unique within HID. 

-- Maarten

Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
*   For searches and help try:

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