I am trying to change the omitted dummy variable from the smallest to some other. In other areas I have found people using the char command to change the base variable, however I cannot get it to work quite right.
What I have essentially done:
preserve
sysuse auto, clear
xtile mpgTiles = mpg, nquantiles(5)
//changing the characteristics of mpgTiles based on the value
char mpgTiles[omit] 5
reg weight length i.mpgTiles
//Trying to label mpgTile
label define mpgs 1 "VHigh" 2 "High" 3 "Medium" 4 "Low" 5 "VLow"
label values mpgTiles mpgs
//Changing the characteristics of mpgTiles based on labels
char mpgTiles[omit] "VLow"
reg weight length i.mpgTiles
restore
both of these would include mpgTiles = 5 or "VLow" when I want that to be excluded and would exclude mpgTiles = 1 or "VHigh", as is the default.
I know I could do it myself by creating dummy variables based on mpgTiles, but I have been suprised not to find a more elegant solution.
Thanks,
Eric
What I have essentially done:
preserve
sysuse auto, clear
xtile mpgTiles = mpg, nquantiles(5)
//changing the characteristics of mpgTiles based on the value
char mpgTiles[omit] 5
reg weight length i.mpgTiles
//Trying to label mpgTile
label define mpgs 1 "VHigh" 2 "High" 3 "Medium" 4 "Low" 5 "VLow"
label values mpgTiles mpgs
//Changing the characteristics of mpgTiles based on labels
char mpgTiles[omit] "VLow"
reg weight length i.mpgTiles
restore
both of these would include mpgTiles = 5 or "VLow" when I want that to be excluded and would exclude mpgTiles = 1 or "VHigh", as is the default.
I know I could do it myself by creating dummy variables based on mpgTiles, but I have been suprised not to find a more elegant solution.
Thanks,
Eric
Comment