Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • panel data / exploratory analysis

    I need to do some exploratory analysis with some panel data. The cross section is American states (48) and time is years (25). I need to calculate the median and interquartile range for each state. Then store the values of these two measures as two variables (n=48) with each case identified by state. Suggestions? Thanks, RB

  • #2
    It's not clear how your data are structured, but if the year is a variable (that is, your data are "long"), you could try something like this:

    . collapse (iqr) iqr = varname (mean) mean = varname, by(state)

    varname is whatever variable you want. See first example in help for collapse.

    If your data are "wide," you might reshape your data first.

    David
    Last edited by David Radwin; 01 Dec 2014, 10:37. Reason: to fix missing punctuation.
    David Radwin
    Senior Researcher, California Competes
    californiacompetes.org
    Pronouns: He/Him

    Comment

    Working...
    X