The data you will be working with in this example is register based. Working with register data offers significant advantages for research. It is highly accurate and reliable, and sourced from official records meticulously maintained for administrative purposes. The data’s longitudinal nature allows for in-depth analysis of trends over extended periods, facilitating comprehensive studies. Moreover, its coverage of large populations ensures substantial sample sizes, enabling statistically robust analyses and enhancing the findings’ generalisability to broader populations.
| Note If you are writing a thesis, a hot tip is to structure your do-file nicely so that you can always come back to the work you have already done. You will, without a doubt, have to modify or redo commands along the way, so it is nice to be able to easily access what you have already worked with. It can be good to write all commands and comments in the do-files and save them as the date you have been working on it. Maybe even throw in a hint on what it is about. You will surely find your preferred way to work once you get into it, but, for example, you can have a do-file called “230211 Time-to-event data” or “230211 variables”. You might have a few that look something like “230211 idontknowwhatimdoingpleasehelp”, but don’t worry. You will get through it. |
Step 1: examine the dataset
First things first; when you have downloaded and opened the dataset, you want to get to know your data. If you are writing your thesis you are going to spend quite a lot of time with your dataset, so it is worth getting to know a little better before you dive into the analyses.
- The
describecommand gives you a quick overlook of your variables and the number of observations in your dataset. This will produce the output that you see below. The dataset consists of 8500 observations and includes eight variables.

More informationhelp describe |
| Note For more review options that can be useful for the dataset you are working with, brush up on the chapter Review dataset. |