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 standardize Stata variables format before using -append- ?I have around 40 files that I would like to append together. However, two variables named a12 and a1…
Can I define the cell contents of a table (or matrix)?New here, new to Stata (v17) I'm trying to create a table to later be exported to Excel. I would li…
Specifying xtpmg optimal lags (2 3 1 2)dear community, i am having trouble specifying the optimal lags (2 3 1 2) chosen by AIC in my pmg mo…
Reshape wide with missing observationsHello, I am trying to reshape wide the dataset below. Basically i would like the months (January th…
Renaming each variable label as a substring of old labelI have a set of variables v1 through v154 that I want to relabel by excluding the first 16 character…
Subscribe to:
Post Comments (Atom)
0 Response to Converting a Continuous Variable to an Ordinal Variable (For Large Numbers)
Post a Comment