Thanks for taking the time to read this!
The Situation
I want to merge two datasets together. For the sake of example, the datasets contain the following info..
Master: SpecificStockPicks, Player, CompanyName, TickerSymbol, StartMonth
Using: CompanyName, TickerSymbol, S&PMonth, StartMonth
Qualitatively, (DataSet2's) StartMonth is exactly the same as the S&PMonth (the month a company was in the S&P500).
In the Master, there are many players. And, each player could have chosen the same stock albeit at the same or at different times. In the Using, many companies show up in the S&P500 month after month (S&PMonth). By hand, I made sure that the Master's company names matched the Using's. However, the TickerSymbols may not match.
What I Did
After performing the following mmerge, I wind up with more observations in the master dataset than before - meaning I can't have done the merge correctly, right?
So, I decided to mmerge on three variables.
After dropping some observations that I don't need, I wind up with exactly the same amount of observations. As I am inexperienced with Stata, I myself cannot confirm whether I have gotten the merge exactly right. That is, for every SpecificStockPick, does my Master data set now show whether it was in the S&P500 or not? Are there any possible problems?
What do you TalkStats frequenters think??
The Situation
I want to merge two datasets together. For the sake of example, the datasets contain the following info..
Master: SpecificStockPicks, Player, CompanyName, TickerSymbol, StartMonth
Using: CompanyName, TickerSymbol, S&PMonth, StartMonth
Qualitatively, (DataSet2's) StartMonth is exactly the same as the S&PMonth (the month a company was in the S&P500).
In the Master, there are many players. And, each player could have chosen the same stock albeit at the same or at different times. In the Using, many companies show up in the S&P500 month after month (S&PMonth). By hand, I made sure that the Master's company names matched the Using's. However, the TickerSymbols may not match.
What I Did
After performing the following mmerge, I wind up with more observations in the master dataset than before - meaning I can't have done the merge correctly, right?
Code:
mmerge CompanyName StartMonth using "Using"
Code:
mmerge CompanyName StartMonth TickerSymbol using "Using"
What do you TalkStats frequenters think??