Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Restructuring & merging multi-level data


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Restructuring & merging multi-level data
Date   Wed, 15 Oct 2003 18:04:58 +0100

Steven A. Harvey, MHS, PhD(c)

> I am attempting a multi-level analysis of data on the
> performance of
> skilled birth attendants at managing labor and delivery in
> 4 countries.  My
> data set on performance is structured with the case (i.e.,
> the woman
> delivering) as the unit of analysis.  For each case, I have up to 8
> variables to record the ID numbers of providers who
> participated (i.e., up
> to 8 providers might have participated in some phase of any
> given case).  I
> also have 4 dummy variables indicating in which of 4 stages
> of labor &
> delivery each provider participated.
>
> My explanatory variables are collected at the provider
> level.  In these
> datasets, I have an individual provider ID # plus
> information about the
> provider's experience, scores on tests, perspectives on the
> quality of the
> health facility in which he/she works, etc.
>
> I need some mechanism in Stata that will help me reorganize
> the first
> dataset so that I have one record for each time a provider
> participated in
> a case (provider x case).  Then I want to match this with
> the explanatory
> variables based on provider ID#, presumably using Stata's
> merge command.
>
> Other than reorganizing the data by hand, I am at a
> complete loss about how
> to approach this.  I would greatly appreciate any suggestions.
>

It is usually much easier to understand a problem
from an example of data than from a verbal description.

My reading of this, however, is that you need a -reshape-
to long, followed as you say by a -merge-. You may well
need some renaming of variables before you can -reshape-.

Check out [R] reshape and also various extras at
http://www.stata.com/support/faqs/data/reshape3.html

Nick
[email protected]

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



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