360Studies

360 Studies.com Logo

Your Destination for Career Excellence in Bioscience, Statistics, and Data Science

Check Variable and Dataset description – STATA

check-variable-and-dataset-description

Before starting this exercise, you should have “DataSet.dta” file. (Download link is given below)

Click here to download“DataSet.dta”

Importing “.dta” file

use "DataSet.dta"

Or

use "/Users/pankajchowdhury/Desktop/NFHS5/DataSet.dta"

I have the file located at “/Users/pankajchowdhury/Desktop/NFHS5/DataSet.dta”. Feel free to modify the file path according to your needs.

 

Code 1:

describe

Explanation : describe This command will provide you all the information such as “variable name”, “storage type”,”display format”, “value label”, “variable label” for all the variables contained in your data set.

Results :

Observations: 636,699
Variables: 17
Variable nameStorage typeDisplayValue labelVariable label
hv005long%12.0ghv005household sample weight (6 decimals)
hv024byte%40.0gHV024state
hv206byte%8.0gHV206has electricity
hv207byte%8.0gHV207has radio
hv209byte%8.0gHV209has refrigerator
Mobilebyte%8.0gHV243Ahas mobile telephone
Computerbyte%8.0gHV243Ehas a computer
sh48int%21.0gSH48what is the caste or tribe of the head of the household?
Internetbyte%8.0gSH50Ninternet
HH_Ownerbyte%8.0gSH61does this household own this house or any other house?
Edu_Yearsbyte%12.0gEdu_YearsRECODE of hv108_01 (education completed in single years)
Castebyte%9.0gCasteRECODE of sh49 (is this a scheduled caste,a scheduled tribe, other backward class)
HHbyte%9.0gHHRECODE of hv219 (sex of head of household)
Religionbyte%9.0gReligionRECODE of sh47 (what is the religion of the head of the household?)
AgeGrpbyte%9.0gAgeGrpRECODE of hv220 (age of head of household)
BPCbyte%9.0gBPCRECODE of BPL_Card (does this household have a bpl card?)
HH_Typebyte%10.0gHH_TypeRECODE of HHType (house type (as defined in nfhs-2 and 3))

Code 2:

describe sh*

Explanation : describe sh* – This command will provide you all the information such as “variable name”, “storage type”, “display format”, “value label”, and “variable label” for those particular variables contained in your data set, starting with the letters “sh”.

Results : 

Variable nameStorage typeDisplay formatValue labelVariable label
sh48int%21.0gSH48what is the caste or tribe of the head of the household?

Code 3:

describe , short

Explanation :describe , short– This command will provide you information related to ” total number of variables”, and “total number of observations” contained in your data set.

Code 4:

describe Religion

Explanation :describe Religion– This command will provide you all the information such as “variable name”, “storage type”, “display format”, “value label”, and “variable label” for a particular variable (“Religion” in this example) contained in your data set.

Result : 

Variable nameStorage typeDisplay formatValue labelVariable label
Religionbyte%9.0gReligionRECODE of sh47 (what is the religion of the head of the household?)

Download the PDF file of this lesson (Click here)

Looking for latest updates and job news, join us on Facebook, WhatsApp, Telegram and Linkedin

You May Also Like

Scroll to Top