How to define value label for categorical variables: Session-6

Опубликовано: 01 Январь 1970
на канале: 2.5 minutes Bio-Stat, Stata, R, SPSS
55
0

#Statalearning
Data Source:
https://github.com/ahshanulhaque/MyDa...
https://github.com/ahshanulhaque/MyDa...
https://github.com/ahshanulhaque/MyDa...
https://github.com/ahshanulhaque/MyDa...

*--Open data
use "D:\stat\RawData.dta"

*--Variable label
la var main_id "Study ID by SRL"
la var c_code "Cluster Code"
la var swt "Sampling weight"
la var mH "Maternal Height in cm"
la var mW "Maternal Weight in kg"
la var mage "Maternal age, year"
la var anemia "Maternal anemia"
la var f_security "Food security"
la var edu "Education"
la var DV "Attitudes to domestic"
la var anc2 "At least 4 ANC"
la var ccex "Sex of child"
la var cage "Child's Age in Months"
la var stunting "Childhood stunting"
la var div "Division"
la var residence "Place of residence"
la var ses "Wealth index"


Define value labels
la de anemia 0 "Non-anemic" 1 "anemic", replace
label define f_security 0 "secure" 1 "insecure", replace
label define edu 0 "Below secondary" 1 "Secondary and above", replace
label define DV 0 "Non-violent" 1 "Violent", replace
label define anc2 0 "Less than 4" 1 "At least 4", replace
label define ccex 1 "Male" 2 "Female", replace
label define stunting 0 "Non-stunted" 1 "stunted", replace
label define div 1 "Barisal" 2 "Chittagong" 3 "Dhaka" 4 "Khulna" 5 "Mymensingh" 6 "Rajshahi" 7 "Rangpur" 8 "Sylhet", replace
label define residence 1 "Urban" 2 "Rural", replace
label define ses 1 "Poorest" 2 "Poorer" 3 "Middle" 4 "Richer" 5 "Richest", replace
*
*
Apply value labels to variables
label values anemia anemia
label values f_security f_security
label values edu edu
label values DV DV
label values anc2 anc2
label values ccex ccex
label values stunting stunting
label values div div
label values residence residence
label values ses ses



Mastering Data Analysis: Biostatistics, Stata, R, SPSS in 2.5 Minutes!

In this quick and informative video, I dive into the essential tools and concepts of biostatistics, focusing on data analysis with popular software like Stata, R, and SPSS. Whether you’re a student, researcher, or data enthusiast, this concise overview will help you understand how to effectively apply these statistical tools to your projects. Get ready to boost your analytical skills and unlock the power of data-driven insights in just 2.5 minutes! Don’t forget to like, share, and subscribe for more bite-sized learning content.