What is StatTag?
StatTag is an open source, free plug-in that integrates document preparation in Microsoft Word with statistical code, results and data. Using StatTag gives you the ability to embed statistical output in Microsoft Word documents, and edit R, R Markdown, SAS, Stata or Python code from within a Word document.
Why use StatTag?
Using StatTag will allow you to modify a dataset or analysis without transcribing and re-copying the results into a manuscript or table.
How is StatTag different than other programs for producing dynamic documents?
StatTag takes the idea of a dynamic document to the next level. Within Word you can:
- Embed statistical outputs such as estimates, tables and figures into a document
- See and edit the code behind output with one click
- Update individual or collective output with one click
Where can I get StatTag?
Click here to download the software for free.
Should I cite StatTag?
Yes. Click here for our citation.
Is StatTag free to use?
Yes. StatTag is made available under the MIT License, which allows free use.
Is StatTag open source?
Yes. The source code for StatTag can be found on our GitHub page: https://github.com/stattag
Can I use StatTag with multiple code files?
Yes. StatTag can be used with multiple code files at the same time, and can be used with .R, .Rmd, .sas, .do, and .py files all at once.
What happens if I save a file in a different location?
StatTag saves the pathway of the code file. When the file is moved, StatTag will alert you that the file needs to be re-linked, and will direct you how to do so. Refer to section 6.0 in the Users Guides for macOS or Windows.
Can I see all the Tags in a document?
Yes. Tags are highlighted when you click on them.
Can I edit my statistical code from Word?
Yes. StatTag will open your statistical code within Word in a text editing window. You can make and save changes to the statistical code from within Word. We recommend, however, that you begin with a code file that already contains your working statistical code and generates the results of interest.
I am collaborating with others on a manuscript. Who can do what? Can a collaborator without StatTag open or modify the Word document? If my collaborator works on the document, can I still edit the statistical code?
My research team uses a mix of Mac and Windows machines. Can we all work on the same manuscript?
StatTag works seamlessly across both operating systems, and collaborators using Windows and macOS may pass files back and forth. The user, regardless of OS, will only need to re-link code files to Word documents using the StatTag user interface.
Do tags remain even as new versions of a Word document are being saved?
Yes, tagging carries over to new versions of Word documents. In fact, tags within the document are carried across different saved versions of the document, across operating systems, and across users with or without StatTag installed.
Can we still track changes and merge documents with StatTag?
Yes, results entered by StatTag will work with Microsoft Word’s “Track Changes” feature, even if your collaborators aren’t using StatTag. Any changes to the tags (formatting changes, deleting, updates) will show up as a change in your Word document. If you have multiple documents from collaborators, you can still use Word’s merge feature to consolidate the changes.
What if I rename my files?
StatTag has built in capability for renaming or moving files. The Word document can be renamed as needed without severing connection to the accompanying code file(s). If the code file(s) are renamed or moved, StatTag will detect and facilitate re-mapping to the new code file(s) through the user interface. Refer to section 6.0 in the Users Guides for macOS or Windows.
What about data security (e.g. PII, PHI)?
StatTag does not store a copy of your data or the statistical code.
Can I insert more than one tag at a time?
Yes. From the Tag Manager window press and hold the Shift key to click and select a range of tags.
How does StatTag work with R Markdown?
When using an R Markdown file, code identified for a tag must be contained within a “code chunk.” Inline code is not supported by StatTag. If an R Markdown code file has the same file name and pathway as an R code file, you should rename one or the other.
When I tried to insert a tag, it showed [NO RESULT]. What do I do?
StatTag returns this value when the plug-in does not capture any information from the statistical program. This is likely a problem with the code itself. Refer to section 6.0 in the Users Guides for macOS or Windows.
When I tried to insert a tag, it returned blank data. What do I do?
Run the code in the native software and check to make sure the result is created without errors. Refer to section 6.0 in the Users Guides for macOS or Windows.
Why does my document take a while to update?
Inserting and updating tables can take a long time due to the number of fields.
What about loops?
Tagged code must stand alone, and cannot be embedded within a loop.
I installed StatTag, but I don’t see it in the toolbar. What do I do?
Check in your program files to ensure StatTag is installed. If installed, refer to section 6.0 in the Users Guides for macOS or Windows.
I need help, what should I do?
The user’s guide for macOS and Windows provides step-by-step instructions for using StatTag as well as tips for troubleshooting. Video tutorials on generating and updating tags are also available. If neither of these resources offer an answer to your question, please email the StatTag team for assistance, StatTag@northwestern.edu.