You are on page 1of 2

2,979 views Mar 10, 2022 Introductory Stata (2022)

Today we will explore the descriptive statistics of the panel data. The panel data structure is more
complex than cross-sectional or time series, so the descriptive statistics may be challenging to
understand. Let's use the long-form panel dataset we saved last time to illustrate panel data's basic
concepts and features. You can also download the dataset from the link below. The dataset contains
multiple observations of US workers from 2010 to 2018.

https://drive.google.com/file/d/1BfUQ...

First, let's set the panel data by typing "xtset," followed by the panel variable "ID" and the time variable
"year."

The command "xtdescribe" tells us about the patterns of the panel data. It is a balanced panel dataset.
There are 4,586 workers in the data over five time periods. The distribution of "T_i" tells us all workers
are observed for five time periods.

Next, let's examine the summary statistics of the panel data. Panel data have two dimensions, across
individuals and over time. An essential feature of the panel data is the between-variation and the
within-variation.

#BetweenVariation #WithinVariation #xtsum #xttab #xtdescribe

*************************************

*56. Panel Data Descriptive *

* Statistics *

*************************************

capture log close

log using panel2.log, text replace

*Open a panel dataset for US workers

use "https://134997773-924437014403349320....", clear

*Set panel data


xtset ID year

*Describe pattern of panel data

xtdescribe

xtdescribe if lwage!=.

*Summarize panel data

xtsum wagerate

xtsum lwage

xtsum schooling

*Tabulate panel data

xttab union

log close

You might also like