Announcement

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

  • Error reshaping from wide to long

    I am getting an error message as 'variable id does not uniquely identify the observations' while reshaping the data from wide to long. I checked my id variable i.e. FIPS and found that there are duplicate observations. However, I cannot remove the duplicates of the id variable FIPS as it will remove observations of another variable called uw_id. I want the variable uw_id for analysis. Removing observations of uw_id by dropping duplicates of FIPS will not serve my analysis. I will appreciate if I receive any help.

  • #2
    Please reference the FAQ for information on how to formulate questions in a way that makes it easy for us to help you.

    Your description of your data is really vague so the best we can do is guess at what you want to do and how best to do it. You need a way to uniquely identify observations to be able to do a reshape. It sounds like the combination of FIPS and uw_id would be a unique identifier, in which case using both variables in your reshape command may get you what you want.

    If that advice doesn't help you'll need to back up and clearly describe what your data looks like and what you want it to look like after your reshape. You can use the dataex command to provide sample data.

    Comment

    Working...
    X