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
How do we use -- e.g. loop over, or save -- all the scalar names in a command's return list without knowing the names in advance?I'd like to be able to access all of the scalar names from a command's return list without knowing w…
Latent variable analysisGood morning, I am trying to combine two variables ( measured ability & ability-self concept) t…
Multivariate Non Linear Decomposition mvdcmpHello All I am trying to work on gender differentials and urban-rural differentials. I have used mvd…
Problems corresponding to variable names in stata double-layer loopsI encountered a problem in the process of data merging. I put 5 control variables into 5 sheets of a…
How to loop through multiple locals instead of all variables inside each local? Code: local ipv "angry fear intimacy_idx cont12_idx ev12_idx pv12_idx sv12_idx ipv_ovall_idx" local…
Subscribe to:
Post Comments (Atom)
0 Response to Can I create a new variable based on data labels
Post a Comment