Hi all, I have two data sets the first: unique identifiers sending in scores and each person can send scores at different times; second data set: unique identifiers being hospitalized or visit the ER which can be multiple times. I want to link the two data sets using frames and their unique identifier
If tried this code:
use Hospitalizations.dta
frame rename default Hospitalizations
frame create scores
frame scores: use scores.dta
sort UniqueIdentifier
frlink m:1 UniqueIdentifier, frame (scores)
THEN, I get the error message "invalid match variables for 1:1 or m:1 match. The variable you specified for matching does not uniquely identify observations in frame scores. Each observation in the current frame Hospitalizations must link to one observation in scores"
If tried this code:
use Hospitalizations.dta
frame rename default Hospitalizations
frame create scores
frame scores: use scores.dta
sort UniqueIdentifier
frlink m:1 UniqueIdentifier, frame (scores)
THEN, I get the error message "invalid match variables for 1:1 or m:1 match. The variable you specified for matching does not uniquely identify observations in frame scores. Each observation in the current frame Hospitalizations must link to one observation in scores"
