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 name | Storage type | Display | Value label | Variable label |
hv005 | long | %12.0g | hv005 | household sample weight (6 decimals) |
hv024 | byte | %40.0g | HV024 | state |
hv206 | byte | %8.0g | HV206 | has electricity |
hv207 | byte | %8.0g | HV207 | has radio |
hv209 | byte | %8.0g | HV209 | has refrigerator |
Mobile | byte | %8.0g | HV243A | has mobile telephone |
Computer | byte | %8.0g | HV243E | has a computer |
sh48 | int | %21.0g | SH48 | what is the caste or tribe of the head of the household? |
Internet | byte | %8.0g | SH50N | internet |
HH_Owner | byte | %8.0g | SH61 | does this household own this house or any other house? |
Edu_Years | byte | %12.0g | Edu_Years | RECODE of hv108_01 (education completed in single years) |
Caste | byte | %9.0g | Caste | RECODE of sh49 (is this a scheduled caste,a scheduled tribe, other backward class) |
HH | byte | %9.0g | HH | RECODE of hv219 (sex of head of household) |
Religion | byte | %9.0g | Religion | RECODE of sh47 (what is the religion of the head of the household?) |
AgeGrp | byte | %9.0g | AgeGrp | RECODE of hv220 (age of head of household) |
BPC | byte | %9.0g | BPC | RECODE of BPL_Card (does this household have a bpl card?) |
HH_Type | byte | %10.0g | HH_Type | RECODE 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 name | Storage type | Display format | Value label | Variable label |
---|---|---|---|---|
sh48 | int | %21.0g | SH48 | what 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 name | Storage type | Display format | Value label | Variable label |
---|---|---|---|---|
Religion | byte | %9.0g | Religion | RECODE of sh47 (what is the religion of the head of the household?) |
Download the PDF file of this lesson (Click here)