Assignment 3 2024

docx

School

University of North Carolina, Charlotte *

*We aren’t endorsed by this school

Course

6102

Subject

Statistics

Date

Feb 20, 2024

Type

docx

Pages

6

Uploaded by PrivateBadgerMaster993

Report
ASSIGNMENT 3: Visualization of: Infant Birth Weight by Sex among Full-term Births; Relationship among Pre-pregnancy Weight, Weight Gained During Pregnancy, & Infant Birth Weight; and Payment Sources for Delivery by Location Due: Thursday, February 15 th by 11:59 pm Assignment 3 assesses concepts and skills primarily covered in Weeks 3-5/Modules 3-5 (see the Module Overview pages for specific module objectives that are assessed throughout this assignment). This class (and work in health/data analytics, epidemiology, and biostatistics, more generally) requires attention to detail and accuracy within assignments and exams. There will be points deducted when instructions are not followed carefully. Use the 2017 CDC natality (birth) dataset that we use in class to solve the questions below. Use only SAS commands learned in class, and include a screen image of the SAS code that shows the code- coloring of the commands in SAS when required to provide SAS code. When submitting your SAS code on assignments, please remember to include the first few lines of code when reading the data and keeping variables. These initial lines of code help you (and us while grading) to ascertain that you're keeping the necessary variables, for example, for inclusion in your analyses. If you are asked to produce graphs or tables, their titles that you add should reflect the content of the corresponding graphs/tables. Provide your responses in the spaces allocated. As noted in the syllabus, each assignment is worth 8% of your overall course grade, and assignments may be completed individually or with your peers. If you complete any assignments with peers, please remember that each individual submit their own assignment for grading and that you include on the submitted assignment the names of those with whom you collaborated (this information is also in the syllabus). 1. Birth weights (DBWT) are expected to have a different distribution for newborns depending on the sex of the infant (SEX). Among non-premature newborns (i.e., use the GESTREC3 variable to identify non-premature babies), produce a figure of boxplots to depict the relationship between infant’s sex and weight, where each boxplot in the figure represents the distribution of newborn birth weights by sex. For the sex with the lower median birth weight, identify the skewness of the boxplot, as well as interpret the values that construct the boxplot. [ 20 points ] SAS plot (5 points) & code (6 points):
Interpretation and any SAS tables used to support your interpretation (also specify which infant sex you are interpreting) (9 points): 2. A colleague is debugging SAS code he is developing. He knows you are a SAS coding expert and is asking you for help with the following code. The data is located in C:/DATA/MYDATA.SAS7BDAT and contains numerical variables FIN1 and FIN2. Which of the following options (circle only one option) best defines where the error(s) is/are located? [ 15 points ] PROC DATA MYSUBSET; * Line 1 ; SET C:/DATA/MYDATA.SAS7BDAT; * Line 2 ; KEEP FIN2<100 AND FIN1>100 * Line 3 ; RUN; * Line 4 ; a. Line 1
b. Line 2 c. Line 3 d. Line 4 e. Lines 1 and 2 f. Lines 1 and 3 g. Lines 2 and 4 h. Lines 1,2, and 4 i. Lines 2 and 3 j. Lines 1,2, and 3 k. Lines 1, 2, 3, and 4 l. The code is correct 3. The following self-contained, stand-alone SAS code performs the following steps: (1) It reads data into SAS; (2) For a given variable, it performs an imputation of missing values using the average of observed values for that variable; and (3) Produces descriptive statistics of the resulting variable after imputation, for a subset of the data. Fill the blanks in the code with the missing variables/commands (one variable/command per space allocated). [ 17 points ] a. __ data__ MYDATA; b. __ set__ ‘C:/MYLOCATION/VARIABLES.SAS7BDAT’; c. __ run__ ; d. __ proc__ __ hpimpute__ DATA = __ MYDATA__ OUT = __ VARIABLES__ ; e. INPUT __ AGE__ VARIABLE1 ; f. __ impute__ AGE / __ method__ = __ mean__; g. RUN; h. __ proc__ __univariate__ __ data__ = VARIABLES ; i. VAR __ VARIABLE1__ ; j. __ where__ VARIABLE1 < 100; k. __ run__ ; 4. A researcher would like to know, for mothers with full term pregnancies (COMBGEST at 39 or 40 weeks), the correlation between (1) the difference between the mother’s weight gained (WTGAIN) and the newborn’s birth weight (DBWT) and (2) the mother’s pre-pregnancy weight (PWgt_R). Produce a 2-dimensional scatterplot (for the first 1,000 observations only), with units in pounds. Also, calculate the linear correlation for the full sample. Is the linear correlation statistically significant (justify your response)? [ 33 points ] SAS CODE (23 points):
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
SAS SCATTERPLOT (4 points): SAS LINEAR CORRELATION REPORT/TABLES (2 points):
LINEAR CORRELATION VALUE & SIGNIFICANCE INTERPRETATION (4 points): 5. Produce two bar charts of payment sources for delivery (PAY), where the first bar chart portrays the distribution for mothers who delivered in hospitals, and the second bar chart portrays the distribution for mothers who intentionally chose home as the place for delivery. Use BFACIL for the aforementioned split by delivery location. Are there any visual differences between the two graphs? [ 15 points ] SAS CODE (6 points): SAS BAR CHARTS (5 points):
INTERPRETATION (4 points):
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help