Data management: How to convert a string variable to a numeric variable

preview_player
Показать описание
This video demonstrates how to convert a string variable to a numeric variable in Stata using the *destring* command.

Copyright 2011-2019 StataCorp LLC. All rights reserved.
Рекомендации по теме
Комментарии
Автор

If your data is stored as text say female and male and you want to make it numeric variable 1=Male 2=Female then follow the steps>Menu>Data>create or change data>other variable-transformation commands>Encode value labels from string variable> then choose source variable (string) and name your new numeric variable (gender2). It works so nice. I hope it helps

retcotz
Автор

This Youtube channel is literally a lifesaver for me in grad school, thanks.

shashavengesayi
Автор

Love your video. To the point and spot on. Keep up the great work :-)

nextgengems
Автор

For everyone where it didnt work:
"If your data is stored as text say female and male and you want to make it numeric variable 1=Male 2=Female then follow the steps>Menu>Data>create or change data>other varaible-transformation commands>Encode value labels from string variable> then choose source variable (string) and name your new numeric variable (gender2). It works so nice. I hope it helps"


Non-disjunction
Автор

Thank you so much sir!
Short and Concise
Really helpful!

dim
Автор

Thank you very much!!! Helped me a lot!!!!

marceloemanoel
Автор

Thanks a lot, this video is really good.

cesarramosh.
Автор

Solved my problem, thank you very much!

jeanmarcelduarte
Автор

I followed your guidance ... yet I cant convert it.

destring credit_line, generate(credit)
credit_line contains nonnumeric characters; no gene
> rate

Emilytan
Автор

Do you know how to correct error 200 in STATA, that one that says no observations. If anyone in the comment knows please let me know

tavoyreid
Автор

How do I convert categorical variable to continuous variable?

jabulanimathebula
Автор

Hi, im working with stata right now. And i have tried with your steps, but it said "no generate". Can you help me with this problem? Thanks

gabrigrisel
Автор

That video does not help at all. Same problem from the comments below

tarsilaguimaraes
Автор

Does not work for me ... STATA is killing me, will use Eviews

dfaltin