Hi, I am new to STATA and am trying to combine multiple datasets which have multiple obs for multiple IDs (health data). I am working on combining the first 2 datasets, realising I should use the command -append-, but the r106 error generates. After further investigation there is one variable "mode_of_separation" which is byte in my "master dataset" with numeric values of (1-11) but string in the other dataset "deathdataset" with words (death on arrival).
The issue I have is that the 2 datasets should combine using the same variable "mode_of_separation" . I have a data dictionary so I know what the string values of the variable in deathdataset should be.
Eg: "Dead on Arrival" in Deathdataset is equal to 8 on the masterdataset
Although there will be 2 new values that need to be added (hence, the append command).
"Death with Autopsy" = 14
"Death without Autopsy" = 15
Wondering if there is a simple way to fix this, so the 2 datasets can be -appended- and the error with the "mode_of_separation" variable fixed to be made to be consistent in a byte format?
Due to confidentiality of my data I will refrain from using Dataex
Any suggestions would be greatly appreciated.
Related Posts with appending datasets receive r106 error - need to convert string vars to byte vars
Truncating numerical dates to yearsI am trying to merge a few datasets, and one of them uses very specific date information in a format…
Row totals for after a specific event occursHello!
I'm certain there is a simple answer to this, so please feel free to direct me to the resour…
Problem with localsMinor but annoying problem with locals. I have a long variable list that I would like to add to a fi…
Large panel model: counting time periods since variable ==1Hi
I have a very large panel dataset (50 time periods, 30m panel IDs) and I have a variable (called…
COEFPLOT, MLABEL(): Line break appears on PNG but not PDFHello all,
I am using COEFPLOT and trying to add a line break to the marker label. Specifically, at …
Subscribe to:
Post Comments (Atom)
0 Response to appending datasets receive r106 error - need to convert string vars to byte vars
Post a Comment