This is my first post on here, my apologies for any errors.
My data is organized by State and Year. There are hundreds of observations per State-Year that have been used to calculate a new variable x that is the same value for every observation within the state-year group. I just want a simple table that lists the first observation of X in each state-year group (or just the value of X for each state year group). The final table might look something like:
State Year X
AL 1980 ##
AL 1982 ##
.
.
WY 1980 ##
WY 1982 ##
I know this should be an easy fix, but I haven't been able to figure it out. The closest I can get gives me error messages about mixing 'by' and 'in' commands.
Using:
by State Year: list X
Gives me every the value of X for observation with the state-year...and all the values of X are the same within that state-year group.
-Will
Related Posts with Time Series Panel Data
Univariate Diagnostic Accuracy commandsHello, I am trying to perform a univariate Diagnostic accuracy using 2x 2 values in STATA. As I have…
area specific linear time trend codingthe data is monthly level data. Coding of the time index variables are as follows: Year: 2005-2018…
stpm2cr: initial values not feasibleHi there, I ran the stpm2cr function on my HIV/AIDS data set. I considered AIDS, non-AIDS diseases …
Multiple Line Graph assistanceHi, I have read many papers on redistribution which have illustrated several graphs of total fiscal…
How to Keep ID's with earliest dates without Diagnosis and ID's with earliest dates with DiagnosisI have a dataset with almost 3 million patientadmissions over a timespan of several years. Every ID …
Subscribe to:
Post Comments (Atom)
0 Response to Time Series Panel Data
Post a Comment