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

st: Picking from a matrix


From   [email protected]
To   [email protected]
Subject   st: Picking from a matrix
Date   Thu, 28 Nov 2002 09:37:40 -0500

This is not a follow-up to the SAS vs Stata thread, although it may end up
that way :-)

I have two files, say File A and File B.

File A is set for survival analysis with multiple records per individual.
Among others, it contains three variables: Year, Age and Area. File B
contains annual aggregated data that describe some higher level
characteristic that I want to use as a regressor. Each line of B refers to a
calendar year, each column of B to age (in year) within one area. The value
of the regressor, for each record, is the element (Year-1, Age in Area) in
File B. I want to copy the appropriate value from B to the the appropriate
line of the regressor column in A.

File A should be well over 200,000 lines with roughly 30 columns. File B
should be 55 by 770.

How do I do that using Stata? More generally, are there references on data
manipulation using Stata?

Benoit Laplante, Ph.D.
Centre interuniversitaire d'etudes demographiques
INRS-Urbanisation, Culture et Societe
Montreal Qc, CANADA

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