Don't wanna be here? Send us removal request.
Text
Data Management and Visualization - Week 2
Code:
#Importing required libraries import pandas as pd
#Getting data in data = pd.read_csv('/home/runadam/Downloads/addhealth/addhealth_pds.csv', low_memory=False)
#Printing out frequency of variable1 print('Count of people who did work around the house, such as cleaning, cooking, laundry, yardwork, or caring for a pet') cl1 = data['H1DA1'].value_counts() print(cl1) print('Percentage of people who did work around the house, such as cleaning, cooking, laundry, yardwork, or caring for a pet') pl1 = data['H1DA1'].value_counts(normalize=True) print(pl1)
#Printing out frequency of variable2 print('Count of ppl who had done either active sport,such as baseball, softball, basketball, soccer, swimming, or football') cl2 = data['H1DA5'].value_counts() print(cl2) print('Percentage of ppl who had done either active sport,such as baseball, softball, basketball, soccer, swimming, or football') pl2 = data['H1DA5'].value_counts(normalize=True) print(pl2)
#Printing out frequency of variable3 print('How is your health') cl3 = data['H1GH1'].value_counts() print(cl3) print('How is your health') pl3 = data['H1GH1'].value_counts(normalize=True) print(pl3)
Output:
runfile('/home/runadam/Downloads/coursera/py_files/week2.py', wdir='/home/runadam/Downloads/coursera/py_files') Count of people who did work around the house, such as cleaning, cooking, laundry, yardwork, or caring for a pet 3 2466 2 2016 1 1759 0 255 8 6 6 2 Name: H1DA1, dtype: int64 Percentage of people who did work around the house, such as cleaning, cooking, laundry, yardwork, or caring for a pet 3 0.379151 2 0.309963 1 0.270449 0 0.039207 8 0.000923 6 0.000308 Name: H1DA1, dtype: float64 Count of ppl who had done either active sport,such as baseball, softball, basketball, soccer, swimming, or football 0 1908 1 1786 3 1582 2 1222 8 4 6 2 Name: H1DA5, dtype: int64 Percentage of ppl who had done either active sport,such as baseball, softball, basketball, soccer, swimming, or football 0 0.293358 1 0.274600 3 0.243235 2 0.187884 8 0.000615 6 0.000308 Name: H1DA5, dtype: float64 How is your health 2 2608 1 1847 3 1605 4 408 5 28 8 5 6 3 Name: H1GH1, dtype: int64 How is your health 2 0.400984 1 0.283979 3 0.246771 4 0.062731 5 0.004305 8 0.000769 6 0.000461 Name: H1GH1, dtype: float64
Interpretation:
Variable 1: There are 2466 people who do works like such as cleaning, cooking, laundry, yard work, or caring for a pet 5 or more times a week while 2016 people do these works about 3 to 4 times a week. 255 people out of 6504 people do no work at all.
Variable 2: A majority of 1908 people out of 6504 do not play any sports such as baseball, softball, basketball, soccer, swimming, or football. 1786 people accounting to about 27.4% play at least 1 or 2 times a week. About 1582 people accounting to around 24.6% of 6504 play 5 or more times a week.
Variable 3: 2608 people accounting to about 40% of population say their general health is very good while 1847 people say their health is excellent. Only 28 people (0.43%) say their health is in poor condition.
0 notes
Text
Add Health Analysis
Dataset:
The National Longitudinal Study of Adolescent Health (AddHealth) is a representative school-based survey of adolescents in grades 7-12 in the United States. The Wave 1 survey focuses on factors that may influence adolescents’ health and risk behaviors, including personal traits, families, friendships, romantic relationships, peer groups, schools, neighborhoods, and communities.
Question:
Is there a correlation between daily activities and general health
Literature Review:
Physical Activity And Physical Fitness Standardizing Assessment With The PhenX Toolkit by William L. Haskell, PhD, Richard P. Troiano, PhD, Jane A. Hammond, PhD, Michael J. Phillips, BS, Lisa C. Strader, MPH, David X. Marquez, PhD, Struan F. Grant, PhD, and Erin Ramos, PhD, MPH is the paper I’ve referred to.
Over the past 60 years data have continued to accumulate demonstrating numerous health benefits of a physically active lifestyle throughout the lifespan and the health advantages of being physically fit.1–3Further, PA/PF are increasingly being recognized as important exposure variables when evaluating gene–environment interactions to determine risk for major chronic diseases. However, there is general agreement that most studies investigating the combined role of genetics and PA/PF on health and performance outcomes have been severely limited because of inadequate sample size.4–6 The ability of researchers to combine data across studies could increase the statistical power to associate phenotypic, environmental and genetic data with disease outcomes, enhancing the opportunity to identify meaningful results that previously might have gone undetected. Also, standardized measurement methodologies facilitate replication of study findings and the comparison of data collected during studies of various population subsets. Metrics of fitness included performance-based measures of integrated fitness (endurance, strength, and flexibility), cardiorespiratory fitness, muscle strength, and physical functioning ability, as well as a non-exercise test of cardiorespiratory fitness. Selected mediator and moderator measures were physical activity self-efficacy, physical activity neighborhood environment, and a subjective measure of functional limitations. The WG also selected a measure of physical activity readiness that is recommended for use prior to physical fitness assessments in adults and older adults.
Variables Considered:
1. During the past week, how many times did you do work around the house, such as cleaning, cooking, laundry, yardwork, or caring for a pet?
2. During the past week, how many times did you do hobbies, such as collecting baseball cards, playing a musical instrument, reading, or doing arts and crafts?
3. During the past week, how many times did you play an active sport, such as baseball, softball, basketball, soccer, swimming, or football?
4. In general, how is your health?
5. feeling really sick?
6. waking up feeling tired?
References:
1. Physical Activity Guidelines Advisory Committee. Physical Activity Guidelines Advisory Committee report. 2008 www.health.gov/paguidelines/Report/pdf/CommitteeReport.pdf.
2. Kodama S, Saito K, Tanaka S, et al. Cardiorespiratory fitness as a quantitative predictor of all-cause mortality and cardiovascular events in healthy men and women. a meta-analysis. JAMA. 2009;301(19):2024–2035. [PubMed]
3. Gupta S, Rohatgi A, Ayers C, et al. Cardiorespiratory fitness and cardiovascular risk of cardiovascular disease mortality. Circulation. 2011;123:1377–1383. [PMC free article] [PubMed]
4. Urso ML. Is it time to change the ground rules of exercise-related genomics research. Med Sci Sports Ex. 2011;43(5):753–754. [PubMed]
5. Bouchard C, Sarzynski MA, Rice TK, et al. Genomic predictors of maximal oxygen uptake response to standardized exercise training programs. J Appl Physiol. 2010 published ahead of print.
6. Hagberg J, Rankinen T, Loos R, et al. Advances in exercise, fitness, and performance genomics in 2010. Med Sci Sports Ex. 2011;43:743–752. [PMC free article] [PubMed]
7. Hamilton CM, Strader LC, Pratt JG, et al. The PhenX toolkit: get the most from your measures. Am J Epidemiol. 2011 in press. [PMC free article] [PubMed]
8. Stover PJ, Harlan WR, Hammond JA, Hendershot T, Hamilton CM. PhenX: a toolkit for interdisciplinary genetic research. Curr Op Lipidology. 2010;21:136–140. [PubMed]
9. Kline G, Porcari J, Hintermeister R, et al. Estimation of VO2 max from a one-mile track walk, gender, age and body weight. Med Sci Sports Ex. 1987;19:253–259. [PubMed]
10. Ebbeling EB, Ward A, Puleo EM, Widrick J, Rippe JM. Development of a single-stage submaximal treadmill walking test. Med Sci Sports Ex. 1991;23(8):966–973. [PubMed]
11. Jurca R, Jackson AS, LaMonte MJ, et al. Assessing cardiorespiratory fitness without performing exercise testing. Am J Prev Med. 2005;29(3):185–193. [PubMed]
12. President’s Council on Physical Fitness and Sports. The Presidents Challenge Adult Fitness Test. 2008Available at the President’s Challenge Adult Fitness Test website.
13. Rikli RE, Jones CJ. Development and validation of a functional fitness test for community-residing older adults. J Aging Phys Activity. 1999;7:129–161.
14. Cureton KJ, Sloniger MA, O’Bannon JP, Black DN, McCormack WP. A generalized equation for prediction of VO2 peak from one-mile run/walk performance in youth. Med Sci Sports Ex. 1995;27:445–451. [PubMed]
15. NIH. National Institute on Aging. The Health, Aging and Body Composition (Health ABC) Study. Operations manual volume XII. Grip Strength. 2006
16. Sallis JF, Bowles HR, Bauman A, et al. Neighborhood environments and physical activity among adults in 11 countries. Am J Prev Med. 2009;36:484–490. [PubMed]
17. Thomas S, Reading J, Shephard RJ. Revision of the Physical Activity Readiness Questionnaire (PAR-Q) Can J Spt Sci. 1992;17:338–345. [PubMed]
18. Motl RW, Dishman RK, Trost SG, et al. Factorial validity and invariance of questionnaires measuring social-cognitive determinants of physical activity among adolescent girls. Prev Med. 2000;31(5):584–594.[PubMed]
19. McAuley E. The role of efficacy cognitions in the prediction of exercise behavior in middle-aged adults. J Behav Med. 1992;15:65–88. [PubMed]
20. Guralnik JM, Simonsick EM, Ferrucci L, et al. A short physical performance battery assessing lower extremity function: association with self-reported disability and prediction of mortality and nursing home admission. J Gerontol Med Sci. 1994;49(2):M85–M94. [PubMed]
21. CDC. National Center for Health Statistics. National Health and Nutrition Examination Survey (NHANES). Sample Person Questionnaire. Physical Functioning Module. 2005–2006 Question number PFQ.061.
22. Hardy LL, Booth ML, Okely AD. The reliability of the Adolescent Sedentary Activity Questionnaire (ASAQ) Prev Med. 2007;45(1):71–74. [PubMed]
23. Marshall AL, Miller YD, Burton NW, Brown WJ. Measuring total and domain-specific sitting: a study of reliability and validity. Med Sci Sports Ex. 2010 [Epub ahead of print] [PubMed]
24. Weston AT, Petosa R, Pate RR. Validation of an instrument for measurement of physical activity in youth. Med Sci Sports Ex. 1997;29(1):138–143. [PubMed]
25. Richardson MT, Ainsworth BE, Jacobs DR, Leon AS. Validation of the Stanford 7-Day Recall to Assess Habitual Physical Activity. Annals Epidemiol. 2001;11(2):145–153. [PubMed]
26. Stewart AL, Mills KM, King AC, Haskell WL, Gillis D, Ritter PL. CHAMPS Physical Activity Questionnaire for Older Adults: Outcomes for interventions. Med Sci Sports Ex. 2001;33(7):1126–1141.[PubMed]
27. Pate RR, Almeida MJ, et al. Validation and calibration of an accelerometer in preschool children. Obesity. 2006;14(11):2000–2006. [PubMed]
28. Taylor-Piliae RE, Norton LC, Haskell WL, et al. Validation of a new brief physical activity survey among men and women aged 60–69 years. Am J Epidemiol. 2006;164(6):598–606. [PubMed]
29. Tudor-Locke C, Bassett DR, Jr, Rutherford WJ, et al. BMI-referenced cut points for pedometer-determined steps per day in adults. J Phys Activity Health. 2008;5(Supp 1):S126–S139. [PMC free article][PubMed]
30. Troiano RP, Pettee Gabriel K, Welk G, Owen N, Sternfeld B. Physical activity and sedentary behavior: why do you ask. J Phys Activ Health. 2012 in press. [PubMed]
31. Objective measurement of physical activity: best practices and future directions. Med Sci Sport Exerc. 2012;44(1 Suppl):S1–S89.
32. NIH. Measurement of physical activity and sedentary behavior by self-report. J Phys Activ Health. 2012;(supplement) in press.
33. National Collaborative on Childhood Obesity Research. Six-part webinar—measurement of active and sedentary behaviors: closing the gaps in self-report methods. www.nccor.org/upcoming_events_webinars_2010.html. [PubMed]
34. Ainsworth BE, Haskell WL, Herrmann SD, et al. 2011 compendium of physical activities: a second update of codes and MET values. Med Sci Sports Ex. 2011;43:1575–1581. [PubMed]
35. Ainsworth BE, Haskell WL, Herrmann SD, et al. The compendium of physical activities tracking guide. Healthy Lifestyles Research Center, College of Nursing & Health Innovation, Arizona State University; sites.google.com/site/compendiumofphysicalactivities/
0 notes