Hello,
At first, I am very beginner of using Stata.
I am currently working on my thesis where I will use the Diff-in-Diff method to analyze whether specific publications (treatment) affect stock prices of firms which are named in these publications.
At first, I need to find matches. I thought of Nearest neighbor matching (nnmatch). I prepared my dataset as follow:
- Treatment: Treated (t=1) n=16 , Untreated (t=0) n > 45000
- ISIN = Identifier
- Matching variables: Industry, Total assets, FTE (Full-Time Employees), RoA (Return on assets)
My procedure:
1) I generated numeric values for the 4 matching variables: e.g., encode Industry, generate (Industry_n)

2) I used "teffects nnmatch (Industry_n Total_assets_n FTE_n RoA_n) (Treatment), biasadj(Total_assets_n FTE_n RoA_n) vce(robust)"
Unfortunately, this line of code always crashes my Stata as it breaks down.
In general, I have to main questions:
1) In literature, it is always ref. to the average treatment effects. I do not have the values of my outcome variables yet. I thought I could find matches solely based on matching variables. I have a sample of 45k possible control matching firms. I cannot calculate all of them. So, do I need a outcome variable to succesfully find matches?
2) If not, how do I need to adjust my code in order to get matches regardless of 1-to-1 or 1-to-many?
I really appreciate your support as I am very new to Stata and perhaps, I miss some basic understand.
So, Thank you very, very much!!!
Chris
At first, I am very beginner of using Stata.
I am currently working on my thesis where I will use the Diff-in-Diff method to analyze whether specific publications (treatment) affect stock prices of firms which are named in these publications.
At first, I need to find matches. I thought of Nearest neighbor matching (nnmatch). I prepared my dataset as follow:
- Treatment: Treated (t=1) n=16 , Untreated (t=0) n > 45000
- ISIN = Identifier
- Matching variables: Industry, Total assets, FTE (Full-Time Employees), RoA (Return on assets)
My procedure:
1) I generated numeric values for the 4 matching variables: e.g., encode Industry, generate (Industry_n)
2) I used "teffects nnmatch (Industry_n Total_assets_n FTE_n RoA_n) (Treatment), biasadj(Total_assets_n FTE_n RoA_n) vce(robust)"
Unfortunately, this line of code always crashes my Stata as it breaks down.
In general, I have to main questions:
1) In literature, it is always ref. to the average treatment effects. I do not have the values of my outcome variables yet. I thought I could find matches solely based on matching variables. I have a sample of 45k possible control matching firms. I cannot calculate all of them. So, do I need a outcome variable to succesfully find matches?
2) If not, how do I need to adjust my code in order to get matches regardless of 1-to-1 or 1-to-many?
I really appreciate your support as I am very new to Stata and perhaps, I miss some basic understand.
So, Thank you very, very much!!!
Chris
Comment