Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

recode_nrep: Automated "Other Specify" Recoding

Stata 17+ Apache License

Automate recoding of "Other specify" responses in survey data.

Install

net install recode_nrep, from("https://raw.githubusercontent.com/ashikpydev/recode_nrep/main/") replace

help recode_nrep

Usage

recode_nrep mainvar splitvar othvar

    mainvar: Primary variable (g1b4)
    splitvar: "Other" dummy (g1b4_97)
    othvar: Text variable (g1b4oth)

Example

Before:

g1b4_97  Other |   21   9.86%
g1b4oth:
   He Plays | 7
   he walks | 14

Command:

recode_nrep g1b4 g1b4_97 g1b4oth

After:

g1b4_97  Other |    0   0.00%
g1b4_1001       |    7   3.29%  // He Plays
g1b4_1002       |   14   6.57%  // he walks

Features

  • Creates new variables for frequent responses
  • Starts new codes at 1001
  • Blanks processed text responses
  • Requires ≥ 10% response frequency

License

Apache 2.0 © 2025 Ashiqur Rahman Rony
Email: ashiqurrahman.stat@gmail.com

recode_nrep

About

Stata command to automate recoding of 'Other specify' survey responses (non-repeated version).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages