ecn310 / course-project-accidentsteam

course-project-accidentsteam created by GitHub Classroom
0 stars 0 forks source link

Edit Master.do File #29

Open annarupert opened 8 months ago

annarupert commented 8 months ago

February 28th, 2024

Goals for this Issue: Highlight the issues within the Master.Do File and fix them.

annarupert commented 8 months ago

Here is a chat gpt answer for how to make a table for summary statistics because the command was not working for me at all. I will come back to this tomorrow and test out other options.

* Load some example data
sysuse auto

* Generate summary statistics
summarize

* Create a table of summary statistics
table summarize, c(mean sd min max) format(%9.2f %9.2f %9.2f %9.2f)
annarupert commented 8 months ago

I still am unable to sort this table issue out. I have been looking everywhere. I found this website STATA HELP but it was not helpful at all. I also looked through the handbook and feel like I am wasting my time HelpBook.

@kbuzard is there something obvious I am missing? Even a link to a video would be fine, I know you are busy.

kbuzard commented 8 months ago

@annarupert This is a case of ChatGPT being pretty terrible for Stata. If you try to run the code on the auto dataset, it doesn't work.

Here's what I suggest. First, check out this guide.

If that doesn't do what you're looking for, describe to me exactly what you're trying to accomplish and I'll give you some pointers.

annarupert commented 8 months ago

@kbuzard I tested this and it still did not work.

I am able to make a single table with a variable and their statistics but not with more than one.

My exact goal is to have a table that includes all 5 variables with their summary statistics. I did not think it would be this complicated, so sorry!

kbuzard commented 8 months ago

@annarupert Here's my best guess at something like what you want (you might want to specify different summary stats).

image

If this isn't what you're looking for, can you give me your code for the table you've created and a screenshot of the table it produces (so I know what you want the bigger table to look like)?

annarupert commented 6 months ago

@kbuzard I am done with the project and the last thing I need to to do is import this table into my Latex file, so sorry if this is a stupid question but I cannot sort out how to do it.

kbuzard commented 6 months ago

@annarupert What kind of file do you have the table saved as?

annarupert commented 6 months ago

I don’t have it saved at all, I have it as a command in stata but that’s it. @kbuzard

kbuzard commented 6 months ago

@annarupert Then I suggest using the outreg2 command to create a table for LaTeX. Here's a place to start: http://repec.org/bocode/o/outreg2.html