Stata - How to use outreg2
Вставка
- Опубліковано 1 лис 2024
- Welcome to my classroom!
This video is part of my Stata series. A series where I help you learn how to use Stata. In this video, we look at how to use the command outreg2 to produce journal style tables.
Note: What I show here is my take on the topic. I would be happy to receive comments!
Useful links:
►Twitch: / steffens_classroom
►Twitter: / steff5001
►Workpage: www.rug.nl/sta...
►Subscribe: cutt.ly/Qfu9cmV
this was so much more helpful than any of the other resources I found - the only one that actually got the results I wanted! thank you so much!!!
Even though this wasn't exactly what I was looking for; I was looking for how to write a title using outreg2, your explanation was so clear and concise I was able to derive it on my own.
You know, I had an entire 30 minutes of a lecture I wholly ignored because of people like you. This is education in the 21st century, thank you very much
thank you for this video! clear, concise and great words of wisdom at the end too
Excellent stick to the point video. Thank you Stephen. I will go through all videos.
Glad it was helpful!
Thank you, professor, very much useful video
I love your videos!
they are saving me everytime!
thank you!
Steffen, thank you so much. This video is so helpful!
FANTASTIC tutorial! Thank you!!
Thank you so much for this beautiful video ❤️❤️❤️
Hey Steffen, Thank you so much for this video!
I am in the process of writing up my undergraduate Economics dissertation and this video will be of huge help :)
Happy to help :)
If you have any ideas for other Stata topics, feel free to suggest!
Good luck with your dissertation.
-The video: "Writing an Empirical Master Thesis" should be of help.
@@SteffensClassroom do you have any idea how I can hide my country fixed effects results using outreg2? I would like to add a row that says "Country fixed effects = YES'" but I want to hide all the results for each country to make my table look neater.
Thank you again :)
Sure!
Check the drop() option for outreg2. The variables you add in here will not be reported in the table, but are still included in the model.
Lmk how it goes!
This has been exactly what I was looking for, thank you so much!
Glad I could help!
Please lmk if there is something else you are looking for!
thank you! SO HELPFUL!!
Hey Steffen, thank you for this video.
I want to ask, can the "outreg2 command be used for summary table?
Hi!
It is possible, I believe. However, I prefer using asdoc for summary statistics. I also have a video on that. Otherwise, you can always type: help outreg2 in your command video. It has a very detailed help file.
This video is awesome !
I need to compare adj R-square with different regression model , how to put it into the table?
Hi Wendy!
If you add the option adjr2 to the outreg2 command, it will add the adjusted R^2.
I hope this helps!
Great stuff man. Thanks a lot!
I'm trying to make a do-file for a PSM analysis generate the difference in ATT between treatment and control groups in 14 dependent variables in a single column, but it is generating 1 column for each dependent variable. I tried using the "onecol", but it didn't solve my problem.
Do you have any insight on this?
Hi Bruno!
Thanks for the question. Indeed outreg2 behaves a bit 'weird' when it comes to PSM estimates. onecol does indeed not do the trick. I have searched around a bit, and came across the following: www.statalist.org/forums/forum/general-stata-discussion/general/1415218-use-outreg2-to-produce-an-unusual-regression-table
They simply generate the table by hand. It is a little more involved, but maybe it will help you.
Sorry I didn't have a simply solution!
Steffen legend
a qq: A Question: with Stata, I am able to label vars successfully ( I can see that in the data table). But I am unable to see the labeled vars names in a logistic model output. Is there a way to make vars' label appeared in the model output (var name, coefficient, t- value, p, and CI)?
Hi!
I believe that you are referring to the label option in the outreg2 command :)
Great Stuff. Question, how do I use Outreg2 on global outcomes, it seems to only add the last global regression.
Hello Stef!
Outreg2 adds the latest regression results. If I understand your question right, then you need to run outreg2 after each regression. Option replace on the first one, and option append afterwards.
If you are using out on a global set, you need to make a loop. See groups and loops video.
I hope this helps, otherwise feel free to send me a mail.
@@SteffensClassroom Think I found it:
. global outcomes "vote trstun"
. foreach var of global outcomes {
reg `var' $controls, robust
outreg2 using Steve-outreg-file, word dec(3) append ctitle(`var') label
}
Using `var` within the brackets solved it for me.
Happy you figured it out :) This was indeed answered in the groups and loops video.
Thank you so much
Do we need to install outreg2 each time using? Or it's installed permanently?
Just once :)
how do I create a tableone with baseline descriptive characteristics at one on STATA? is there any package like in R?
Hello!
For summary statistics I usually use the asdoc package. I also describe that in another video.
Amazing, thank you! Have you done any videos about propensity score matching and when to match and when to adjust for covariate using STATA? my problem though is how to get info of cohorts with table of baseline characteristics after PSM. I get the same cohort I had before matching. I now btw by using tebalance summarise I can have a sort of description of mean difference for the covariate before and after, but I just want to have a simple normal tableone. thanks a lot you rule!@@SteffensClassroom
what to write int the command if i wanna show the adj r square in the tabel with outreg?
adjr2
You can see it in the help file. Type help outreg2.
Hi, im trying
outreg2 using myfile
but i keep getting this error .
- is not a valid command name
(error occurred while loading outreg2.ado)
r(199);
someone knows what does it mean?
Did you make sure to install this command first?
Ssc install outreg2?
Why do many columns appear when I download, if I only want one?
Hmmm I think it is because you have run the outreg2 command with append a few times. Each time you run it, it adds a column. You should remove the file and runnthe code again. Please make sure to set it up properly in your do-file :)
@@SteffensClassroom how can i delete columns and stay with 2 columns? Whats it name of the command?
@@stefanomuzio4615 Like I said. Each time you run outreg2 it creates a column. You need to line this up in a do-file if you want to do this effectively. If you have added too many columns, delete the file you have created, or simply add the option replace in the do-file the first time you add a column. Just like I explain in the video. After you have run the command twice, simply stop.
thank you 谢谢
why is my output in excel even after typing word
Hello!
So you use option word, correct? And not option excel. Make sure that you only use the option that you want. You should get a txt file plus the file that you specified in the options.