Announcement

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

  • Cross Section Data --> Panel

    I've been trying to aggregate my current data set into a panel format. Currently the data is a cross section of people and I'd like to aggregate by state. For example, there are multiple observations for Maine in 2013 and I'd like to condense the data so that is its own row. Some variables that are individual specific would be dropped but the state variables toward the end would be kept. Any help would be much appreciated!

    Note that when I try running ~dataex~ I receive an error message as I have too many variables. Is there a way I can get around that to share my data?

  • #2
    If your data set has too many variable for -dataex-, you can specify variables for -dataex- in a variable list, just as you would in, say, a regression command. If you don't follow what I mean by that, run -help dataex-, and in the window that pops up scroll down to where it says Examples to see how it's done. Pick out the ones that you think are most illustrative for what you want to do. In light of what you say in #1, you would need the state itself and the year, and then a few individual-specific variables and a few state-level variables.

    That said, although I don't find your description of your problem entirely clear, it is likely that the solution will involve the -collapse- command. So you can get a leg up on this by reading the help file for that. While you're doing that, click on the "Remarks and examples" link in the help file to jump to the corresponding section of the PDF documentation to see how it's used in practice.

    Comment


    • #3
      Figured it out using collapse command, thanks for the hand!

      Comment

      Working...
      X