Hi, I have a continuous variable (median household income) from my census data that I am trying to convert into an ordinal variable (i.e. I'm trying to make median household income groups). I attempted to split up the variable (FSA_medincome_household) into 12 groups based on an incremental income of $10,000, using this code:
egen FSA_medincome_household_743ord = cut(FSA_medincome_household_743), at(10000(10000)120000) label
The problem here is that all my variables get coded as missing. I am not sure if it has something to do with the large numbers for the variable or because it's represented as a long storage type.
Can anyone help me figure out what I am doing wrong?
Thanks in advance!
Related Posts with Converting a Continuous Variable to an Ordinal Variable (For Large Numbers)
how to use tempvar more efficiently?If I run syntax with tempvar in a block, Stata will generate variables such as __0000001 __0000002, …
Issue with loop saving graphs with more than one wordHi all, I have set up the following loop: Code: foreach name in "Botswana" "Burkino Faso" "Camero…
Omitted variables in RE regressionHello everyone, I have panel data with 163 countries and 15 time units (months). I am trying to inc…
Help with Panel Data fixed effectsDear all, I need help with running a fixed effect regression in Stata, but let me tell you in advan…
Ivreg2 -Endogeneity and Hansen J statisticsHello all, I'm currently working on a cross-section with iveg2 (gmm2s to address the heteroskedasti…
Subscribe to:
Post Comments (Atom)
0 Response to Converting a Continuous Variable to an Ordinal Variable (For Large Numbers)
Post a Comment