Most of the code in the code blocks is the same from example to example.Įxample 1: Writing returned results to Excel This allows you to see the new code in the context of the overall program but it also makes the post appear longer than it is. This is because each example contains the code from the previous example along with new lines of code. Today’s blog post is lengthy and contains several large code blocks. This is another important step toward our goal of automating the creation of reports in Excel. You could extend this idea by creating a do-file for each report and passing the variable names into the do-files. This will allow me to create the same report for arbitrary variables by simply assigning new variable names to the macros. I am also going to pass the variable names into my programs using local macros. But you could modify the examples below to include column percentages, percentiles, standard errors, confidence intervals or any statistic. I am going to create tables that combine cell counts with row percentages, and means with standard deviations. Today I want to show you how to create custom reports for arbitrary variables. In my last post, I demonstrated how to use putexcel to recreate common Stata output in Microsoft Excel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |