![]() The data set used has many problems that can interfere with analysis. Just these few lines of code will create the unbelievably useful codebook shown below. Include reports identifying potential problems in the data.Add “One record per CASEID” indicating which variable(s) uniquely identify each observation to codebook header.List variables in the codebook by their INTERNAL order (order stored in the data set).Write your codebook in a file named /Data_Detective/Book/Blog/SAS_Programs/My_Codebook.rtf.Find the formats assigned to the STUDYA_PRELIM in a format catalogue located in the folder assigned to the libref LIBRARY.Create a codebook for SAS data set STUDYA_PRELIM located in the temporary Work library automatically defined by SAS.Libname library "/Data_Detective/Formats/Blog_1_Codebooks" Ĭb_file=/Data_Detective/Book/Blog/SAS_Programs/My_Codebook.rtf,Īfter creating titles for your codebook, this simple program provides %TK_codebook with the following instructions: Title3 height=10pt 'Data simulated to include anomalies illustrating the power of %TK_codebook' Title2 height=10pt 'Simulated Data for Participants in a Health Study' Title height=12pt 'Master Codebook for Study A Preliminary Data' Look how easy it is to create a codebook if you have a SAS data set with labels and formats: Not only will this macro change the way you clean and prepare your data, but it also gives you an effortless way to evaluate the quality of data you obtain from others before you start your analysis. Variables missing an assigned user-defined formatĪll you need is a SAS data set with labels and formats assigned to each variable and the accompanying format catalogue. ![]() You will easily uncover potential problems lurking in your data including variables that have: Not only does this macro create an amazing codebook showcasing your data, it also automatically performs quality control checks on each variable. Instead of spending your time preparing your data, you will be using your data to change the world!ĭo you want to spend less time on the tedious task of preparing your data? I want to tell you about a magical and revolutionary SAS macro called %TK_codebook.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |