There are many more formats and settings that you can change in Excel by using putexcel. putexcel (B7)=picture("bar1.png") using 401k_report.xlsx, modify Title("Plan Participation by Number of Options") graph bar (mean) prate, over(sole) ytitle("Participation Rate") You can also write a wide range of graph file formats, including PNG, JPEG, WMF, and TIFF.įor example, I can add a bar graph of the average participation rate for companies over whether the 401(k) is the only retirement option offered by typing. putexcel (C3:D5)=nformat("number_sep_d2") (C2:D5)=halign("center")īut, putexcel can do even more. Now, I want to center the column text and results and format the numeric output to two decimals. putexcel (B5:D5)=border("bottom", "double") using 401k_report.xlsx, modify (B2:B5)=border("right", "thin") using 401k_report.xlsx, modify putexcel B3=("Matching Rate") B4=("Only Option") B5=("Constant") To add row labels and a cell border between the label and results, I type. (B2:D2)=border("bottom", "thin") using 401k_report.xlsx, modify I can add bold column titles, “Estimate” and “S.E.”, and a cell border between the title and results to the worksheet by typing. putexcel C3=matrix(b) using 401k_report.xlsx replaceīut my table is not quite publication-ready yet. All you need to do is extract the appropriate rows and columns from the matrix. Most estimation commands in Stata store results in the r(table) matrix, giving you an easy way to access estimated coefficients, standard errors, test statistics, and the like from a single stored result. fracreg probit prate mrate sole (output omitted)Īfter I fit my model, I want to write out the estimated coefficients and standard errors to Excel. New capabilities of putexcel in Stata 14 let you format cells and fonts in Excel.This means that you can now easily export matrices, expressions, and stored results from Stata to Excel and control how they appear. A short description of the variables is shown to the right. Formatting Excel ® tables from within Stata. Suppose I am estimating a fractional-response model for 401(k) participation and want to create a table of my results that I could include in a presentation or publication. Now it’s easy to format the cells to create custom tables or reports. You can also insert Stata graphs and add cell formulas. This means that you can now easily export matrices, expressions, and stored results from Stata to Excel and control how they appear. New capabilities of putexcel in Stata 14 let you format cells and fonts in Excel. Formatting Excel ® tables from within Stata
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |