This will actually allows us to add more than the original SPSS file would have held, since we can now have labels as well as the rationale behind them, in the form of comments. We can use comments to add explanations to our new file as we add commands to it. * This is a comment and will continue to be a comment until the terminating asterisk-slash */ * This is a comment and will continue to be a comment until the terminating period. In SPSS, comments can be added to scripts in three ways, following this guide (quoted here):ĬOMMENT This is a comment and will not be executed. csv data file, and can carry all of that extra metadata information. In order to get around that, we can create a new plain-text file that contains commands for SPSS. csv file (which is a more open format), one of the drawbacks is that the information from this second screen will be lost. It would have been hard to guess these things from only the short variable names in the dataset. In addition, if we were to click on the “Values” cell for the “Grade” variable, we would see that 1=Freshman, 2=Sophomore, and so on. ![]() ![]() Your collaborator has even noted in the label for the opaquely-named “RxnAfterTx” variable how that variable was calculated. We can see a better description of what each variable comprises in the “Label” column - “Rxn1,” we can now understand, is a participant’s reaction time on some activity before taking a drug. SPSS has a “variable” view that shows metadata about each variable. csv, and then to save a second, auxiliary file, along with the data to carry that additional information. One way to do this is to save the data in an open format, such as. We can get around this while at the same time making things more transparent to future investigators. The data themselves should be fine, but extra features, such as labels and other “metadata” (information about the data, such as who created the data file, when it was last modified, etc.), sometimes don’t get carried over. When you save a file in an open format, though, sometimes certain types of extra information get lost. closed formats, you likely know that data stored in open formats stand a better chance of being usable in the future. Annotating within Statistics Scripts: Commenting Codeįollowing my post on open vs. Even if you don’t use SPSS, though, the same principles should hold with any analysis program. sav files for SPSS, a statistics program that’s widely used in my home discipline, Psychology. I’m going to share a few tips for making this easier with a small amounts of effort. Think of it this way: if you were hit by a bus and had to come back to your work much later, or have someone else take over for you, would your project come to a screeching halt? Would anyone even know where your data files are, what they represented, or how they were created? If you’re anxiously compiling a mental list of things that you would need to do for anyone else to even find your files, let alone interpret them, read on. ![]() Our goal today is simple: Make it easier to figure out what you were doing with your data, whether one week from now, or one month, or at any point down the road. Making a “ codebook” can also be a good way to accomplish this.Īnnotating your files as insurance for the future… Even just adding comments to your data files or writing up and annotating your analysis steps can help you and others in the future to figure out what you were doing. This will let you save data in an open, future-proofed format, without losing labels and other extra information. Short version: Write a script to annotate your data files in your preferred data analysis program (SPSS and R are discussed as examples). Today’s topic is annotating your work files. This post is part of a series on future-proofing your work ( part 1, part 2).
0 Comments
Leave a Reply. |