Dear EpiData users, How to make a Boxplot when I have one quantitative variable and two qualitatives variablesThanks __________________________________ Konan Diby JP, MD, MPH Attaché de Recherche Labo. Biostatistique & Info. Médicale UFR Sciences Médicale, U. Abidjan-Cocody 22 BP 1041 Abidjan 22, Côte d'Ivoire Tel./Fax: (+225) 22 493 334 GSM: (+225) 08 167 578 / 02 724 162 skype's: dibykonanjp
Dear EpiData users, How to make a Boxplot when I have one
quantitative variable and two qualitatives variablesThanks
Two strategies:
say you have: age and wish to look at this by sex and social class
Variables: age sex rank
strategy one:
box age /by=sex /Ti="Age among those with low social class" if rank = 1 box age /by=sex /Ti="Age among those with high social class" if rank = 2
strategy two:
gen i level = 0 if (sex = 1) and (rank = 1) then level = 1 if (sex = 1) and (rank = 2) then level = 2 if (sex = 2) and (rank = 1) then level = 3 if (sex = 2) and (rank = 2) then level = 4 labelvalue level /O="Missing information" /1="Male low" /2="Male High" /3="Female Low" /4="Female High"
box age /by=level /ti="Boxplot of age by sex and social class" box age /by=level /ti="Boxplot of age by sex and social class" if level > 0
regards
Jens Lauritsen
EpiData Association
participants (1)
-
epidata-list@lists.umanitoba.ca