Stata Basics 7: Create categorical var from continuous var recode(English version)

Поділитися
Вставка
  • Опубліковано 4 вер 2019
  • Stata command recode can convert a continuous variable to a categorical variable according to the rules specified.
    The commands in the video:
    ***************
    * recode ****
    ***************
    set more off
    webuse nlsw88.dta, clear
    summarize grade
    recode grade (0/11=1) (12=2) (13/15=3) (16=4) (17/18=5), generate(edu)
    tabulate edu
    recode grade (0/11=1 "LessHi") (12=2 "HighSc") (13/15=3 "SomeColle") (16=4 "BacheDeg") (17/18=5 "GradDeg"), generate(edu2)
    tabulate edu2
    codebook married
    recode grade (0/11=1 "LessHi") (12=2 "HighSc") (13/15=3 "SomeColle") (16=4 "BacheDeg") (17/18=5 "GradDeg") if married==1, generate(edu3)
    codebook edu3
    【Free Courses on My UA-cam Channel】
    Economics in Real Life:
    • Economics in Real Life
    Solutions to Introductory Econometrics A Modern Approach 7th Edition:
    • Solutions to Introduct...
    Solutions to Microeconomics Theory and Applications with Calculus:
    • Solutions to Microecon...
    Stata Tutorials:
    • Stata Tutorials
    Five Minute Econometrics (Econometrics Tutorials):
    • Five Minute Econometri...
    Introductory Microeconomics:
    • Introductory Microecon...
    Introductory Stata:
    • Introductory Stata (2022)
    Drum Covers:
    • Drum Covers
    【粵語Cantonese】現實生活中的經濟學:
    • 【Cantonese粵語】現實生活中的經濟學
    【國語Mandarin】現實生活中的經濟學:
    • 【Mandarin國語】現實生活中的經濟學
    【粵語Cantonese】微觀經濟學基礎:
    • 粵語Cantonese微觀經濟學基礎2022
    【粵語Cantonese】五分鐘計量經濟學:
    • 【Cantonese粵語】五分鐘計量經濟學(...
    【國語Mandarin】五分鐘計量經濟學:
    • 【Mandarin國語】五分鐘計量經濟學(計...
    On the Road:
    • On the Road
    【Become a Supporter/Member of the channel ($2.99) to get PDF transcripts for】
    1. Solutions to Microeconomics Theory and Applications with Calculus 5th Edition,
    2. Solutions to Introductory Econometrics A Modern Approach 7th Edition,
    3. Introductory Stata (2022),
    4. Introductory Microeconomics (2022), and
    5. Introductory Stata: Summary Statistics and Data Management
    / @bobwenecon
    In addition to the videos on my UA-cam channel, you can also learn Stata from my free Alison online courses.
    Introductory Stata: Summary Statistics and Data Management
    alison.com/course/introductor...
    Introductory Stata: Graphics and Data Visualization
    alison.com/course/introductor...

КОМЕНТАРІ • 2