Cauane Blumenberg

Data scientist . PhD Epidemiology . MSc Computer Science

Covid-19 BR application now online!

Developed by Cauane Blumenberg, the Covid-19 BR application aims to support authorities and population in monitoring the pace of evolution of Covid-19 in Brazil.

The app plots the number of new cases of Covid-19 in the last seven days against the cumulative number of cases. Considering that these quantities are proportional, both are plotted using the log-scale to approximate a linear relation. The idea behind this approach is to avoid presenting an exponential relation, which is characteristic of infectious diseases, but usually harder to understand.

Users can easily select which federation unit they want to add to the graph using the checkboxes. The app is available in Portuguese.

Youtube video featuring labtrunc12

I’have recently started a new project: a Youtube channel that will focus on the usage of several Stata commands. I’ll cover both beginner and advanced commands.

We still have only 3 videos published. One of the videos show how to use the labtrunc12 command to enable a Stata dataset to be saved using an older Stata version. The video can be found at the end of this post.

All videos will be in Portuguese, but we plan to add some subtitles in English. So, don’t forget to subscribe to the channel and stay tuned!

Truncating variable labels to save databases in Stata 12 version

Sometimes we have to save our Stata databases using an old version. This has to be done, because some people still work with the long standing Stata 12 version. However, when we use the saveold command to do so, we sometimes face a problem with the long variable labels.

For this reason I developed an ado file called labtrunc12 that truncated all variable labels to an adequate length in order to save the database using the Stata 12 version. The syntax is very simple, you just have to type labtrunc12 and all database labels will be truncated. Instructions to use the command can be obtained typing help labtrunc12 into Stata.

Download labtrunc12 from my git repository: https://github.com/cauanebs/labtrunc12

Installing ado files in Stata

Perform the following steps to install ado files in Stata:

  1. Open Stata
  2. Type personal and hit enter to discover the location of your personal ado folder
  3. Navigate to the personal ado folder (if after navigating there is no folder called personal, create one)
  4. Unzip the downloaded file into the personal ado folder

Merging three numeric variables into one date format variable

There are many advantages of using datetime variables in Stata, including the possibility to perform simple calculations between dates. However, working with dates in Stata is not a simple task.

Trying to skip the difficulties of using datatime variables in Stata, some research groups collect dates into three separate variables containing the day, the month and the year. But, by doing this, it becomes very difficult to perform calculations.

For this reason, I developed a Stata command called mergedate. This command merges three numeric variables (day, month, and year), and creates on single variable using the datetime format. Instructions to use the command can be obtained typing help mergedate into Stata.

Download mergedate from my git repository: https://github.com/cauanebs/mergedate

Installing ado files in Stata

Perform the following steps to install ado files in Stata:

  1. Open Stata
  2. Type personal and hit enter to discover the location of your personal ado folder
  3. Navigate to the personal ado folder (if after navigating there is no folder called personal, create one)
  4. Unzip the downloaded file into the personal ado folder

Finding nonnumeric characters within string variables

The destring is one of the main commands used to clean databases in Stata, as it can be used to convert string variables to numeric variables. This is a very important feature, especially if a database from another source (e.g. Excel) is imported into Stata.

The destring command will only work if the string variable that we are trying to convert to numeric contains no nonnumeric characters. For example, if we have a variable coded as “0” or “1”, but in a given observation it was coded by mistake as “1b”, the destring command will not work. If we are dealing with small databases, it might be easy to visually identify which observation was wrongly coded. However, if we have a large database, containing lots of observations, this process might be difficult.

For this reason, I developed a Stata command called findnonnumeric. This command searches form nonnumeric characters within a string variable and lists the observations that have this issue. Instructions to use the command can be obtained by typing help findnonnumeric

Download findnonnumeric from my git repository: https://github.com/cauanebs/findnonnumeric

Installing ado files in Stata

Perform the following steps to install ado files in Stata:

  1. Open Stata
  2. Type personal and hit enter to discover the location of your personal ado folder
  3. Navigate to the personal ado folder (if after navigating there is no folder called personal, create one)
  4. Unzip the downloaded file into the personal ado folder

coortesnaweb project receives best paper award @ REDCapCon

 

The 1st Latin-American REDCap Congress (REDCapCon) was held in São Paulo,  at the Sírio Libanês hospital, on the 26th and 27th-April. The main focus of the congress was on the REDCap software – a web application for building and managing online surveys and databases.

Almost 300 participants registered to the event, and over 50 studies were presented. The study entitled “Integrating REDCap to a gamified web-based platform used in a birth cohort follow-up: the coortesnaweb project”,  by Cauane Blumenberg and Aluísio JD Barros, received the best paper award!

The coortesnaweb project

The coortesnaweb is a web-based platform that contains a complete environment to conduct web-based epidemiologic research. More information about the project can obtained here.