Announcement

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

  • Can I create a new variable based on data labels

    Good day.

    I am trying to replicate the results of a journal article. I have a dataset from the survey and I was hoping for advice on the following:
    1. Creating a new variable (highcrime) based on the data labels of the variable DISTID. I want to classify the districts into high crime and low crime and start my summary statistics from there.
    2. My summary statistics would depend on the new variable as I have to generate mean and SD for both groups with the following variables: age, education, marital status, HH size etc.

    I have a screenshot of the summary statistics I want to replicate

    Click image for larger version

Name:	summary stat.PNG
Views:	1
Size:	19.1 KB
ID:	1686173


    Thank you in advance.

  • #2
    Joyce:
    as per FAQ, could you please provide interested listers with an excerpt/example of your dataset via -dataex-? Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment

    Working...
    X