Lab Assignment 2 Note: Include ALL the relevant coding used to answer the questions to obtain full marks. Data dictionar
Posted: Tue Jul 12, 2022 8:09 am
questions 4 and 5
Lab Assignment 2 Note: Include ALL the relevant coding used to answer the questions to obtain full marks. Data dictionary: Maternal Age (years) Gestational weight gain (kg) Gestational diabetes mellitus (GDM): Yes or No 2. 3. Create three vectors using the data provided in the table. (Hint: follow the rules for creating proper variable names in R-Studio). Generate a dataframe using the three vectors. Provide an output of this dataframe. (Total/ 10 Marks) Filter the data to only include females without GDM. How many females are in the filtered group? 4. Report mean, Q1, and Q3 for gestational weight gain in the overall sample. 5. Create a histogram for gestational weight gain and add a title “Distribution of gestational weight gain”. Age 36 31 27 33 33 24 27 27 36 28 Gestational weight gain 2.9 10 6.5 4.5 25.5 17.5 18.2 GDM Yes No No No No ves No Yes No Yes
please answer the codes for Lab Assignment 2 Note: Include ALL the relevant coding used to answer the questions to obtain full marks. Data dictionary: Maternal Age (years) Gestational weight gain (kg) Gestational diabetes mellitus (GDM): Yes or No 2. 3. Create three vectors using the data provided in the table. (Hint: follow the rules for creating proper variable names in R-Studio). Generate a dataframe using the three vectors. Provide an output of this dataframe. (Total/ 10 Marks) Filter the data to only include females without GDM. How many females are in the filtered group? 4. Report mean, Q1, and Q3 for gestational weight gain in the overall sample. 5. Create a histogram for gestational weight gain and add a title “Distribution of gestational weight gain”. Age 36 31 27 33 33 24 27 27 36 28 Gestational weight gain 2.9 10 6.5 4.5 25.5 17.5 18.2 GDM Yes No No No No ves No Yes No Yes