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
Array
Thank you in advance.
Related Posts with Can I create a new variable based on data labels
Peer firm averageHi, I have a panel data (firm-year level). Anyone knows how to construct Peer firm average, which i…
How to refer to specific pairs of observations-variables using locals, ex: "`=price[make == "AMC Concord"]'"Dear all, I was trying to automate the creation of a two-sided bar graph and then realized that the…
Data visualization - How to break a label on tline into multiple lines?Hello, Please see my current graph. I would like to split the "Arab Spring" label in two lines M…
Generating week IDs based on fiscal yearsI am quite new to stata and struggling to generate weeks based on fiscal year start and end dates. S…
Testing proportional hazard assumption in multilevel parametric event settingHello everyone, I am conducting a recurrent event-history analysis using the mestreg command with e…
Subscribe to:
Post Comments (Atom)
0 Response to Can I create a new variable based on data labels
Post a Comment