Announcement

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

  • Labeling only certain variables based on another variable

    Hi,

    I want to add labels to my variable "Q10" which consists of a list of years my respondents moved into their current home. I want to label the years by: newcomers, early gentrifiers and long-term residents. However, I have two types of respondents: respondents who have visited market A and respondents who have visited market B, and this is specified in variable Q1. For both markets I have a different range of years:

    Market A:
    Newcomers: 2018 and above
    Early gentrifiers: 2015- 2018
    Long-term residents: below 2015

    Market B:
    ​​​​​​​Newcomers: 2019 and above
    Early gentrifiers: 2015 - 2019
    ​​​​​​​Long-term residents: below 2015

    I do not know how to divide Q10 by "Market A respondent" and "Market B respondent" (which is mentioned in Q1) and then label both groups individually (but with the same label).

    I hope my question is clear, I cannot find this anywhere. Thank you in advance!

  • #2
    I can't follow this and suspect that you're using the term "label" in a way that doesn't match any Stata sense of variable label, value label, or dataset label. It's fine that you haven't internalised all the jargon but the consequences are just that (a) searches in Stataland will likely find material irrelevant to your need (b) we (I) have difficulty in knowing what you want.

    If you don't get a better answer, please give a data example to illustrate what you need following the detailed advice at https://www.statalist.org/forums/help#stata

    Comment

    Working...
    X