Load the birthwt dataset included in the MASS package. It\'s already preload dat
ID: 3303702 • Letter: L
Question
Load the birthwt dataset included in the MASS package. It's already preload data set. when you open R and download the data set. the data set is available in public. use this command on your R software to download the data:
data(birthwt, package = "MASS")
PLEASE use R and show all your R script
Create a Table 1" for the dataset by indicator of low birth weight (include all other
variables in the table). This is typically a table summarizing the baseline characteristics
of your sample. Attached is an example (Table 1) for a toy study. Notice that different
summaries are given for diferent types of variables. In your table, choose and indicate
Table 1. Baseline Characteristics of Study Participants (N-2660) treatment N-1323 ntro Age (years), Mean(SD) Weight (kg), Median(IQR) Female, n (%) Education, n (%) Nc-1337 42.4 (13.3 4.9(13.1) 77 (12) 822 (61.5 809 (61.1) 73 (7) 66 (4.9) 319 (23.9) Some high school or Less High school graduate Some college or technical school 643 (48.1 College graduate 57 (4.3) 279 (21.1) 672 (50.8) 315 (23.8) 21.1 (2.9) m2), Mean (SD) 309 (23.1) 22.3 (3.4) BMIExplanation / Answer
> library("MASS")
> d=birthwt
> summary(d)
low age lwt race
Min. :0.0000 Min. :14.00 Min. : 80.0 Min. :1.000
1st Qu.:0.0000 1st Qu.:19.00 1st Qu.:110.0 1st Qu.:1.000
Median :0.0000 Median :23.00 Median :121.0 Median :1.000
Mean :0.3122 Mean :23.24 Mean :129.8 Mean :1.847
3rd Qu.:1.0000 3rd Qu.:26.00 3rd Qu.:140.0 3rd Qu.:3.000
Max. :1.0000 Max. :45.00 Max. :250.0 Max. :3.000
smoke ptl ht ui
Min. :0.0000 Min. :0.0000 Min. :0.00000 Min. :0.0000
1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.:0.00000 1st Qu.:0.0000
Median :0.0000 Median :0.0000 Median :0.00000 Median :0.0000
Mean :0.3915 Mean :0.1958 Mean :0.06349 Mean :0.1481
3rd Qu.:1.0000 3rd Qu.:0.0000 3rd Qu.:0.00000 3rd Qu.:0.0000
Max. :1.0000 Max. :3.0000 Max. :1.00000 Max. :1.0000
ftv bwt
Min. :0.0000 Min. : 709
1st Qu.:0.0000 1st Qu.:2414
Median :0.0000 Median :2977
Mean :0.7937 Mean :2945
3rd Qu.:1.0000 3rd Qu.:3487
Max. :6.0000 Max. :4990
> lbw=d[,3]
> summary(lbw)
Min. 1st Qu. Median Mean 3rd Qu. Max.
80.0 110.0 121.0 129.8 140.0 250.0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.