[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: RE: Reading multiple observations per line
Sure, if you prefer a more complicated
solution and more work.
gen id = _n
reshape long group x y z, i(id)
There may be a simpler way with a dictionary,
but this should be (the sketch of) one solution.
> Can it be done using a dictionary?
> > . infile str1 sex v1-v3 using fraser.dat
> > This really is well covered by the online help.
> > > I would like to read a series of variables; group, x, y,
> and z, where
> > > there are several sets of observations per line. Here are
> some sample
> > > lines of data.
> > >
> > > T 12 22 1478 F 18 20 1278 F 13 28 1077
> > > T 11 33 1789 T 17 29 1122 F 19 39 1557
> > >
> > > How can this be done? I tried using the dictionary but I
> don't know
> > > how to tell Stata that the second observation starts at
> column 14 and
> > > the third starts column 27.
* For searches and help try: