I currently have a variable called "Residence" which takes on two values: Urban and Rural
I'm generating a new variable called "Rural" which will take on values 1 for rural and 0 for urban. I'm creating this new variable based on this variable "Residence".
With the gen command, I'm facing problems of "type mismatch"
What should I do?
Related Posts with Generating a numeric variable from string variable
Simple Binary Outcome QuestionHello, I am having a problem understanding a simple statement that I need to code in Stata. Define…
Measurement invariance MGCFA: correct approach and issue with identification of configural modelDear Statalist members, I have a question about measurement invariance testing for multigroup confi…
Need help with creating first difference operator for regression - econometricsHi There Everyone. I hope you're all well. I had a question, I'm really lost - i need to create a f…
Collapsing data by both weighted and unweighted meansI have a dataset of ~100K, and I'd like to collapse the data for variable Alpha into its mean, and v…
Need Help Appending a Column Using AsdocDear all, I am using Stata 16, on mac and have provided a sample of my dataset using dataex at the …
Subscribe to:
Post Comments (Atom)
0 Response to Generating a numeric variable from string variable
Post a Comment