Book Image

Data Analysis with STATA

Book Image

Data Analysis with STATA

Overview of this book

Table of Contents (16 chapters)
Data Analysis with Stata
About the Author
About the Reviewers

The labeling of data, variables, and variable transformations

Stata is easy to use and gives you the leverage point of labeling different variables in the data you have acquired/imported. It also allows you to:

  • Label the dataset itself

  • Label different value signs in the imported dataset

  • Label various variables in the imported dataset

For example, let's assume that we have a dataset with no labels. The name of the dataset/filename is Fridge_sales.

You can leverage Stata functions and commands and do not have to write code from the beginning.

To get details of the current dataset (Fridge_sales), type the following command in Stata:


Here is the output of this command:

Now, you can leverage a command called label data so that you can add the label that can describe the dataset in detail. The label of the dataset can have a maximum length of 80 characters. To label the data, use the following command:

label data "This dataset has fridge sales data from year 2000"

As discussed previously in...