the universal writing platform

Sometimes, you might want graphics such as histograms to contain x lines. In this blog entry, we’ll show you how to add x lines to graphics using simple code in Stata.

Stata offers a simple means of exporting data into a number of other useful formats. In this blog entry, you’ll learn how to use Stata’s export function.

Stata can hold vast amounts of data. Sometimes, instead of scrolling through the edit window, you want to be able to call up just the data that are relevant to you. Here, we’ll show you variations of the list command in Stata that can help you.

Oftentimes, you might work with datasets in which variables need to be renamed. In this blog, we’ll show you how to rename variables in Stata.

The Cox proportional hazards model can be understood simply in terms of calculating the risk of an adverse event (hazard) as a function of some set of predictors. For example, death might be the hazard, and the use of a drug and the age of a patient...

Splitting variables of string type in Stata can be a shortcut to performing statistical analyses that rely on numeric rather than string variables. In this blog, we’ll show you how to take this approach, saving you plenty of time in manual recoding.

In a regression that takes place over time, it is possible for there to be one or more breakpoints in the regression. A breakpoint is what it sounds like: A point in time that marks the shift of a model. In this blog, we’ll show you how to...

Stata offers a lot of color options in its graphics. In this blog, we’ll introduce you to some of Stata’s color schemes and show you how to manipulate individual colors within a graphic.

Sometimes, you will need to create a single variable from two or more existing variables in Stata. In this blog, we’ll show you some options for doing so.

In a previous blog entry, we discussed recoding between string and numeric formats in Stata. In this blog, we’ll show how you to recode numeric variables in Stata.

Log transformations can be used for many purposes in statistical analysis. In this blog entry, we’ll explain one scenario in which a log transformation is particularly useful in demonstrating a trend. Fortunately, log transformations are...

Loading data into statistical programs such as Stata can be a challenge in its own right. When working on a larger project—for example, on a dissertation or thesis—your data are likely to be extensive and...

Sometimes, when conducting a statistical procedure, you need to know how to be able to integrate categorical (factor) variables into your analysis. In this blog, we’ll offer some points on how to use categorical variables by applying the i. prefix in Stata.

Often, statistical analysis requires you to be able to generate descriptive and inferential statistics (and even graphics) separately for different groups. When you need to do so in Stata, the by command is indispensable. In this blog, you’ll learn how to...

There are many reasons you might need to be able to generate sequential data in a dataset. In this blog, we’ll show you how to do so in R and provide a contextual example.

For purposes of statistical analysis, you will often want to use qualitative labels such as, for the variable of marital status, ‘Single,’ ‘Married,’ or ‘Divorced.’ However, you also want these labels to...

The chi square statistic and its underlying p value are most often calculated in order to determine whether some observed distribution is normal. In this post, we’ll show you how to run and interpret a chi square analysis in Stata.

Sometimes, working with a dataset requires you to create rounded versions of a variable. In this blog, we’ll show you how to use R to round numbers.

Sometimes, working with a dataset requires you to create rounded versions of a variable. In this blog, we’ll show you how to use Stata to round numbers.

The Kaplan-Meier estimate is a means of tracking the odds of surviving a failure event (such as death or sickness) over time. Learn how to create a Kaplan-Meier graph using Stata.

To mark our first year, we've slashed all our prices in half. Order now to seize this limited opportunity!