About

In this project, we will explore predictive analytics using the babies data set provided. This data is collected to understand different factors effecting baby weights at birth. Below are the explanations of the variables:

Count: number of observation bwt: Baby weights in ounces gestation: Length of pregnancy in days parity: = 0 if the baby is first born, =1 otherwise height: Mother’s height in inches weight: Mother’s pregnancy weight in pounds smoke: =1 if mother is smoker, = 0 Nonsmoker age: Mother’s age in years

Read this worksheet carefully and follow the instructions to complete the tasks and answer any questions. Knit your final worksheet and submit your work as an HTML or PDF or Word document in Sakai.

If you are submitting as a team project only one submission from one of the team members will be sufficient but in this case you need to input the names of the team members in the above Title section.

Task 1: Reading the babies file & understanding the relatioships (0.25 points)

#Read File and check the first 6 observations
mydata <- read.csv(file="babies.csv")
head(mydata)
##   Count bwt gestation parity height weight smoke age
## 1     1 120       284      0     62    100     0  27
## 2     2 113       282      0     64    135     0  33
## 3     3 128       279      0     64    115     1  28
## 4     4 108       282      0     67    125     1  23
## 5     5 136       286      0     62     93     0  25
## 6     6 138       244      0     62    178     0  33
#### How can you describe the relationship between baby weights and other variables? You are expected to explain each relationship. 

Gestation relationship: As the baby weight goes up, the gestation increases as well (positive and linear) Parity relationship: There is a weak negative relationship between the first born babies and their baby weight (lesser weight) Height relationship: The shorter the mother is, the more the weight of the baby is (not as linear but positive) Weight relationship: The lighter the mother, the heavier the baby is (not as linear so positive but moderate) Smoke relationship: If the mother smokes, the baby weight is smaller than those that do not smoke (moderate negative) Age relationship: The older the mother is, the heavier the baby is (positive and linear)

Task 2: Multiple Linear regression model(2.0 points)

Extract all the variables and create a multiple linear regression model.

bwt <- mydata$bwt
gestation <- mydata$gestation
parity <- mydata$parity
height <- mydata$height
weight <- mydata$weight
smoke <- mydata$smoke
age <- mydata$age
#Multiple Linear Regression Model
model1 <- lm(formula = bwt~gestation+parity+height+weight+smoke+age,data=mydata)

#Summary of the model
summary(model1)
## 
## Call:
## lm(formula = bwt ~ gestation + parity + height + weight + smoke + 
##     age, data = mydata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -57.613 -10.189  -0.135   9.683  51.713 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -80.41085   14.34657  -5.605 2.60e-08 ***
## gestation     0.44398    0.02910  15.258  < 2e-16 ***
## parity       -3.32720    1.12895  -2.947  0.00327 ** 
## height        1.15402    0.20502   5.629 2.27e-08 ***
## weight        0.05017    0.02524   1.987  0.04711 *  
## smoke        -8.40073    0.95382  -8.807  < 2e-16 ***
## age          -0.00895    0.08582  -0.104  0.91696    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 15.83 on 1167 degrees of freedom
## Multiple R-squared:  0.258,  Adjusted R-squared:  0.2541 
## F-statistic: 67.61 on 6 and 1167 DF,  p-value: < 2.2e-16

Interpret the value for the intercept (0.25 point):

When all is zero, the baby weight is -80.41085

Interpret the value for the slope of gestation (0.25 point):

The baby weight increases by 0.44398 with every additional day added onto the gestation

Interpret the value for the slope of weight(0.25 point):

The baby weight increases by 0.05017 with every additional unit of weight from the mother

Interpret the value for the slope of smoke (0.25 point):

The baby weight decreases by -8.40073 with smoking mothers compared to mothers that do not smoke

Interpret the value for R-squared (0.25 point):

The value of R-squared, which is 0.258, represents the variable explanation of the variance of the baby weights presented within the model

Task 3 Evaluating significance/insignificance of the variables (0.5 points)

Do you think the model has insignificant variables, if so which variable(s) is/are insignificant?

Yes I do. I think that the variable age is insignificant due to age not really being a determining factor as to how much a baby will weigh compared to the other variables. ####Is removing insignificant variables improving your model’s predictivity? Not really, it does not have a significant effect/change on the predictions.

#Multiple Linear Regression Model
model2 <- lm(formula=bwt~gestation+parity+height+weight+smoke,data=mydata)

#Summary of Multiple Linear Regression Model
summary(model2)
## 
## Call:
## lm(formula = bwt ~ gestation + parity + height + weight + smoke, 
##     data = mydata)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -57.716 -10.150  -0.159   9.689  51.620 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -80.71321   14.04465  -5.747 1.16e-08 ***
## gestation     0.44408    0.02907  15.276  < 2e-16 ***
## parity       -3.28762    1.06281  -3.093  0.00203 ** 
## height        1.15497    0.20473   5.641 2.11e-08 ***
## weight        0.04983    0.02503   1.991  0.04672 *  
## smoke        -8.39390    0.95117  -8.825  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 15.82 on 1168 degrees of freedom
## Multiple R-squared:  0.2579, Adjusted R-squared:  0.2548 
## F-statistic:  81.2 on 5 and 1168 DF,  p-value: < 2.2e-16

###Task 4: Estimating baby weight (0.25 points)

Use your best predicting model and full model to estimated a first born babies weight, whose mother is 25 years old, newer smoked, the gestation was 286 days, mother’s height is 62 inches and mother’s weight is 93 pounds

# bwt predicted
bwt_predicted <- coef(model1)[1]*(parity)+coef(model1)[2]*(age)+coef(model1)[3]*(gestation)+coef(model1)[4]*(height)+coef(model1)[5]*(weight)
bwt_predicted
##    [1]  -856.3715  -842.9894  -836.2310  -844.4688  -864.2650  -716.7068
##    [7]  -722.9180  -872.6413  -898.5255 -1071.3665  -843.9852  -838.9528
##   [13]  -843.5983  -814.5774  -852.1560  -756.0545  -778.2360  -766.7464
##   [19]  -855.8536  -819.2859  -813.5670  -860.3676  -817.3843  -886.8537
##   [25]  -775.7819  -847.8218  -792.3653  -876.0530  -816.4342  -811.1379
##   [31]  -832.1469  -796.0345  -830.2598  -843.2565  -847.9891  -839.1610
##   [37]  -870.7035  -796.2969  -883.1285  -833.1675  -809.9916  -727.1855
##   [43]  -821.4438  -880.2993  -820.1428  -819.8969  -877.9987  -768.8033
##   [49]  -845.3984  -849.9255  -857.6377  -791.1018  -829.4497  -825.3627
##   [55]  -758.4046  -820.8337  -681.3456  -822.4589  -865.2271  -840.1224
##   [61]  -725.7277  -850.1922  -841.5068  -721.8359  -813.6092  -813.3308
##   [67]  -820.2046  -866.8865  -881.3761  -851.3893  -823.4281  -810.9726
##   [73]  -825.2617  -861.9647  -821.7672  -830.6228  -816.2946  -878.4998
##   [79]  -842.3299  -875.1972  -812.2576  -858.1477  -883.1087  -888.5470
##   [85]  -914.4146  -846.3353  -802.0904  -815.2253  -839.1878  -849.6290
##   [91]  -760.5928  -908.7111  -751.5034  -840.9901  -817.1243  -834.7520
##   [97]  -821.8569  -828.6730  -856.9161  -816.0219  -916.0261  -816.0406
##  [103]  -911.1009  -755.8585  -835.0819  -825.8556  -828.6769  -842.3932
##  [109]  -780.7341  -707.6550  -872.0158  -850.5440  -858.8534  -842.4264
##  [115]  -817.3916  -852.5780  -830.8933  -797.4739  -805.5683  -651.4447
##  [121]  -837.1458  -793.3180  -886.9693  -856.6843  -833.6496  -764.7771
##  [127]  -827.9063  -850.2080  -805.4647  -819.7039  -787.4758  -879.4806
##  [133]  -903.2037  -829.2407  -801.3180  -824.1547  -782.0969  -894.5702
##  [139]  -818.8279  -832.6925  -802.8979  -835.2698  -853.2580  -967.2435
##  [145]  -843.2571  -869.7924  -879.8092  -866.0223  -810.7624  -770.0464
##  [151]  -892.6582  -872.8193  -868.7554  -869.5420  -907.3570  -890.1308
##  [157]  -818.2135  -806.1788  -863.4705  -839.0874  -832.2324  -820.3331
##  [163]  -790.3495  -839.3348  -866.2063  -873.9113  -857.7122  -826.7798
##  [169]  -811.7831  -825.0193  -929.7255  -768.7455  -805.9734  -731.1580
##  [175]  -794.4170  -826.4345  -826.9909  -704.7335  -887.1935  -818.1053
##  [181]  -873.9894  -825.0000  -972.9017  -877.2064  -803.5275  -823.4013
##  [187]  -851.8214  -853.0642  -849.0690  -862.5710  -840.7287  -833.4628
##  [193]  -811.8949  -731.5835  -808.1704  -779.4988  -846.2126  -874.2824
##  [199]  -680.0726  -858.1907  -683.2256  -820.3524  -874.1350  -825.5512
##  [205]  -859.8125  -824.9691  -781.5414  -860.5595  -796.6716  -756.1741
##  [211]  -852.0800  -823.4204  -731.7868  -872.0647  -876.2240  -961.3485
##  [217]  -827.5074  -797.8651  -829.3725  -814.7482  -883.3287 -1000.3385
##  [223]  -831.8276  -861.6369  -817.3646  -837.8181  -824.8405  -774.7359
##  [229]  -840.6635  -822.0233  -781.2498  -863.3970  -853.0334  -997.1641
##  [235]  -875.3436  -861.4253  -867.3768  -858.9160  -397.0565  -757.1620
##  [241]  -866.1023  -880.6433  -777.4384  -840.1567  -880.3096  -844.8224
##  [247]  -840.3919  -830.4022  -891.5350  -910.2775  -864.9061  -905.8657
##  [253]  -811.1877  -906.0756  -935.4248  -816.9523  -923.9806 -1048.5655
##  [259]  -825.0262  -927.5876  -879.4223  -973.8530  -914.2419  -926.8715
##  [265]  -962.2194  -824.8846  -930.2415  -851.4890  -991.3660  -836.0992
##  [271]  -993.7750  -898.9459  -937.8369  -788.1398  -889.7469  -822.2735
##  [277]  -894.6251  -852.0719  -876.5266  -860.7957  -930.6236  -961.3476
##  [283]  -870.4068  -939.8484  -759.5281 -1003.9214  -894.7091  -845.6253
##  [289]  -871.3645  -822.3009  -836.6943  -831.3052  -801.2560  -803.5968
##  [295]  -794.4558  -833.0976  -851.4896  -930.0482  -820.7029  -935.0195
##  [301]  -769.2894  -887.5707  -917.3257  -882.2933  -850.3041  -868.9229
##  [307]  -815.0714  -806.1435  -874.1469  -899.5934  -914.3964  -851.0472
##  [313]  -755.4945  -922.5903  -815.3222  -826.8478  -884.2195  -824.6520
##  [319]  -877.5931  -833.6181  -824.6988  -720.5311  -838.4257  -885.2825
##  [325]  -973.4598  -936.5875  -830.6687  -841.9199  -911.6019  -952.9220
##  [331]  -802.8475  -834.3313  -854.6429  -864.4933  -845.9658  -684.9819
##  [337]  -815.6465  -860.2364  -993.2499  -852.2457  -875.0227  -883.9121
##  [343]  -816.6681  -963.6090  -888.9839  -839.4358  -946.2598  -828.8824
##  [349]  -880.0174  -912.4852  -817.9079  -843.8743  -919.6762  -792.2097
##  [355]  -916.0171  -735.4814  -870.3439  -876.9142  -865.3961  -926.5353
##  [361]  -831.6503  -823.2506  -946.6340  -899.3178  -962.1079  -950.0967
##  [367]  -842.1597 -1033.6254  -870.6881  -951.0533  -814.6306  -902.3310
##  [373]  -845.6655  -863.6630  -782.3973 -1003.5195  -926.1259  -847.2772
##  [379]  -829.4909  -832.9658  -941.3420  -829.4763  -884.3129  -824.2309
##  [385]  -947.8229  -838.3782  -984.4370  -848.3624  -890.9178  -842.0332
##  [391]  -870.9235  -912.5049  -812.6321  -939.2696  -916.1723  -839.6781
##  [397]  -799.5321  -826.2114  -739.4578  -893.5536  -955.0042  -843.7352
##  [403]  -936.0187  -834.6999  -791.0571  -816.1641  -874.6482  -832.2557
##  [409]  -829.3843  -688.2988  -965.8819  -823.5669  -753.9770  -846.9700
##  [415]  -952.9058  -919.3368  -837.2701  -921.6879  -878.4437  -932.3485
##  [421]  -835.8029  -854.8355  -854.6769  -818.8693  -857.8019  -801.6478
##  [427]  -756.0224  -817.1365 -1066.6683  -927.2224  -644.1183  -932.1905
##  [433]  -809.9642  -883.7671  -828.1025  -838.1170  -935.1663  -993.4616
##  [439]  -890.0808  -837.6125  -904.1634  -802.9044  -918.1757  -834.5314
##  [445]  -801.0211  -955.0328  -883.2030  -772.3615  -834.7526  -711.2648
##  [451]  -847.6878  -894.6095  -797.7873  -920.1896  -830.6779  -875.3204
##  [457]  -869.3416  -959.0589  -955.9324  -884.4525  -908.1539  -835.7608
##  [463]  -952.6964  -856.5962  -740.0431  -684.8928  -788.6158  -797.2153
##  [469]  -933.7692  -935.6221  -874.8096  -889.5413  -845.9699  -806.6035
##  [475]  -864.7484  -813.1792  -779.2911  -872.5981  -942.5460  -841.6731
##  [481]  -796.5441  -865.2464  -847.2937  -837.4208  -808.0203  -852.7620
##  [487]  -838.4865  -704.9500  -857.7498  -942.9398  -870.9085  -961.2057
##  [493]  -817.4755  -849.9576  -818.5263  -900.8801  -865.8084  -850.5474
##  [499]  -902.7244  -910.1279  -821.8152  -893.1589  -933.0591  -908.3592
##  [505]  -876.6702  -806.9695  -818.1435  -913.9477  -963.9374  -840.7780
##  [511]  -910.0052  -917.2640  -959.5717  -908.2595  -823.3244  -878.2341
##  [517]  -848.1274  -901.1489  -939.5041  -833.4209  -784.7827  -959.2624
##  [523]  -938.2532  -781.3850  -817.1127  -986.1481  -771.1206  -831.9964
##  [529]  -892.7516  -924.0106  -795.8331  -748.4778  -801.6844  -778.7533
##  [535]  -818.5036  -948.3977  -938.6633  -776.4610  -873.6564  -756.1473
##  [541]  -814.6424  -810.3739  -761.0532  -848.4059  -967.5581  -860.9992
##  [547]  -944.9310  -840.7281  -932.5830  -908.4109 -1014.9691  -850.8490
##  [553]  -801.1837  -789.3539  -845.2979  -787.0016  -887.1426  -998.9002
##  [559]  -811.3310  -889.2799  -948.2751  -818.7330  -866.2940  -891.6964
##  [565]  -935.5211  -827.8941  -914.7833  -856.8665  -925.5162  -907.9386
##  [571]  -890.4200  -839.3700  -905.1084  -798.0341  -829.1367  -940.1522
##  [577]  -961.3507  -814.2224  -863.4446  -837.2888  -816.3261  -887.0413
##  [583]  -815.9435  -823.8102  -727.6576  -890.1491  -809.3703  -799.8932
##  [589]  -914.3085 -1019.0594  -816.5644  -920.0391  -766.8023  -911.3237
##  [595]  -959.3417  -876.3764  -957.6348  -766.7297  -801.3604  -921.9073
##  [601]  -861.1814  -819.8193  -829.6455  -830.1128  -937.8681  -863.8359
##  [607]  -868.8231  -733.1648  -807.1165  -902.2035  -879.9211  -866.6185
##  [613]  -922.9301  -823.1391  -878.6742  -820.5297  -847.8106  -786.2922
##  [619]  -892.0216  -841.7974  -743.7567  -894.2870  -948.9845  -823.3201
##  [625]  -824.4249  -837.9748  -900.7639  -894.4497  -826.5161  -852.5427
##  [631]  -869.6419  -753.7028  -828.4263  -819.4445  -836.2235  -801.4800
##  [637]  -912.7064  -849.8869  -844.4379  -966.8517  -756.1105 -1039.5551
##  [643]  -802.6334  -823.3506  -878.1939  -802.3300  -820.0896  -961.8639
##  [649]  -905.0569  -894.2013  -807.4636  -848.6097  -843.8695  -835.0963
##  [655]  -778.8186  -967.8672  -800.2932  -887.6009  -846.6251  -764.5951
##  [661]  -975.4400  -896.9752  -946.4866  -897.7928  -671.4693  -965.8096
##  [667]  -857.9508  -818.6762  -859.4012  -937.0002  -916.6468  -931.0552
##  [673]  -906.8590  -809.4869  -923.1383  -980.2651  -806.7345  -828.1146
##  [679]  -822.8599  -830.7107  -716.9273  -862.7382  -755.4720  -841.5687
##  [685]  -933.2675  -860.7492  -819.4872  -830.9588  -828.8205  -806.6829
##  [691]  -976.4468  -810.5516  -951.6362  -927.9828  -806.4635  -925.9187
##  [697]  -916.8899  -798.1425  -939.3378 -1041.6438  -867.6088  -867.0632
##  [703]  -786.5623  -815.8712  -826.3687  -825.6166  -819.2975  -854.3030
##  [709]  -950.0219  -836.9715  -870.8963  -926.9216  -830.3019 -1002.5019
##  [715]  -825.3820  -845.9197  -919.2434  -852.4121  -875.8144  -877.9947
##  [721] -1050.6493  -876.4468  -808.2391  -912.0569  -861.7641  -841.6579
##  [727]  -854.4413  -856.7160  -907.6653 -1029.2573  -825.1573  -750.6847
##  [733]  -952.6974  -848.2081  -984.5517  -727.8657  -798.1683  -851.6437
##  [739]  -817.6219  -747.2422  -929.3060  -812.5168  -832.8082  -938.8256
##  [745]  -920.5175  -863.4699  -838.6945  -939.4627  -863.0152  -884.7721
##  [751]  -825.6206  -810.4553  -834.9651  -919.0113  -870.4639  -810.7985
##  [757]  -825.4880  -961.8418  -934.8491  -802.7106  -760.4774  -922.5075
##  [763]  -824.3049  -799.0451  -826.2809  -841.9556  -831.3397  -836.7638
##  [769]  -854.8470  -950.3999  -855.3256  -781.9159  -869.1163  -801.4839
##  [775]  -820.4710  -887.6324  -983.4261  -846.4594  -957.7759  -784.2026
##  [781]  -672.1831  -725.1009  -900.6418  -848.3281  -657.4317  -847.2354
##  [787]  -843.2169  -860.3003  -823.0790  -878.5615  -927.4538  -778.6196
##  [793] -1007.8113  -852.7592  -962.1428  -857.6458  -911.5861  -841.9117
##  [799]  -785.6282  -799.3589  -880.5336  -890.3435  -929.8628  -886.2855
##  [805]  -832.0360  -853.8437  -846.2004  -871.6750  -864.2651  -859.8278
##  [811]  -875.7595  -940.6202  -855.2795  -927.6741  -853.5200  -810.0821
##  [817]  -966.1753  -823.3534  -887.3404  -509.7065  -933.4597  -847.4402
##  [823]  -934.4437  -895.5292  -964.3087 -1012.2006  -887.8121  -810.2969
##  [829]  -869.8109  -894.6302  -907.2245  -846.3282  -824.3271  -957.3135
##  [835]  -866.8282  -978.8054  -793.1549  -932.6454  -777.8671  -939.5356
##  [841]  -817.7624  -848.7678  -867.0067  -922.1197  -836.0848  -946.3708
##  [847]  -751.3308  -923.8907  -826.3341  -962.4543  -845.6953  -807.1383
##  [853]  -922.8145  -872.8311  -815.7400  -799.4620  -902.8928 -1007.8817
##  [859]  -914.9172  -718.3856  -873.3923  -914.0339  -833.8497  -843.3247
##  [865]  -833.3637  -928.5343  -878.2091  -849.0912  -843.3798  -825.7096
##  [871]  -865.5869  -950.6940  -856.3297  -690.9107  -922.2120  -889.8931
##  [877]  -882.2544  -801.5536  -957.8535  -900.4202  -860.0081  -828.0106
##  [883]  -749.2537  -864.5386  -852.0323 -1007.8421  -810.1041  -923.7368
##  [889]  -815.1912  -793.9071  -890.5499  -877.8161  -865.7901  -955.1746
##  [895]  -777.2141  -936.0736  -845.5954  -793.5142  -958.5079  -855.6459
##  [901]  -875.5501  -973.5794  -815.1091  -884.9899  -874.4331  -973.2865
##  [907]  -806.4333  -861.4905  -764.1972  -808.7062  -848.7680  -849.1887
##  [913]  -811.5043  -919.0667 -1008.2886 -1007.3265  -960.8301  -919.1867
##  [919]  -936.7749  -841.8890  -974.3430  -814.0051  -581.1751  -910.1045
##  [925]  -851.7445  -885.0339  -864.1225  -842.2837  -853.4499  -950.1416
##  [931]  -973.7987  -827.3610  -851.1039  -847.3404  -810.2774  -870.3818
##  [937]  -963.6866  -930.0017  -845.1931  -767.2468  -816.1005  -909.2626
##  [943]  -848.1963  -887.7981  -846.5528  -820.0464  -988.4688  -824.3421
##  [949]  -898.1461  -916.1823  -995.8045  -822.3003  -848.5106  -801.9287
##  [955]  -940.7859  -829.4367  -832.2598  -758.8492  -846.2386  -870.5673
##  [961]  -829.8009  -738.9305  -828.8434  -725.9580  -883.5999  -808.7712
##  [967]  -860.6015  -723.7708  -871.9429  -946.5358 -1002.6088  -853.7812
##  [973]  -754.7110  -860.3517  -967.6509  -829.4302  -792.4752  -879.2338
##  [979]  -690.9422  -866.1256  -824.3579  -959.8079  -867.2722  -850.7562
##  [985]  -796.3660  -972.9734  -924.9226  -920.6377  -861.5563  -793.2862
##  [991]  -932.6799  -871.2050  -937.7485  -924.5238  -949.7721  -908.9385
##  [997]  -810.1462  -799.5626  -825.5699  -870.7078  -810.1502  -862.9621
## [1003]  -813.8749  -856.3488  -844.7342  -826.4737  -877.5504  -678.8189
## [1009]  -920.1009  -849.0715  -844.6457  -887.8984  -914.0773  -801.0669
## [1015]  -943.7189  -892.3912  -957.1848  -877.0373  -870.0559  -843.8195
## [1021]  -990.9600  -933.1467  -915.5386  -815.2608  -883.2554  -952.6937
## [1027]  -822.0991  -876.8833  -791.1398  -895.4093  -913.0218  -964.3458
## [1033]  -863.5434  -951.7932  -872.4825  -836.7897  -836.8560  -870.2330
## [1039]  -828.6933  -848.1234  -912.7592  -844.4213  -828.7746  -829.2366
## [1045]  -893.4549  -794.4164  -930.1678  -855.4159  -848.8871  -915.2265
## [1051]  -878.0828  -833.5562  -822.5408  -853.1963  -815.9868  -820.2789
## [1057]  -883.1075  -894.0029  -843.2863  -843.9466  -845.1742  -815.4302
## [1063]  -792.6951  -827.9041  -865.0529  -870.6115  -899.7669  -928.1607
## [1069]  -898.2499  -843.6757  -858.5244  -814.6262  -856.8039  -749.8788
## [1075]  -895.5448  -919.9276  -732.5868  -834.7900  -857.8225  -907.3902
## [1081]  -944.1708  -783.0750  -969.7670  -798.5584  -780.0612  -849.6952
## [1087]  -838.1266  -836.4394  -726.0851  -905.1413  -868.1481  -792.5440
## [1093]  -856.6989  -780.6015  -656.2856  -887.6346  -848.7807  -874.5643
## [1099]  -808.8528  -885.7722  -773.8837  -875.2707  -802.4580  -787.6556
## [1105]  -873.7444  -852.2691  -857.5287  -887.7467  -935.3943  -793.3100
## [1111]  -885.7679  -759.0039  -806.4843  -922.4248 -1084.4858  -840.1212
## [1117]  -948.0547  -878.9101  -829.3374  -794.5402  -818.9654  -822.6253
## [1123]  -810.5471  -804.2532  -904.8363  -905.1289  -885.6364  -825.2617
## [1129]  -908.8539  -845.8671  -919.1936  -949.1093  -874.5219  -809.4049
## [1135]  -899.5839  -823.4275  -922.8267  -902.8366 -1033.7725  -841.0083
## [1141]  -850.4290  -900.5163  -855.9110  -818.1471  -792.6338  -720.4672
## [1147]  -811.8016  -851.9249  -927.7204  -810.9874  -792.2060  -935.0654
## [1153]  -797.1536  -887.6757  -797.3624  -965.5060  -859.5883  -970.4046
## [1159]  -942.8931  -954.9441  -949.6444  -861.2459  -840.7281  -934.3864
## [1165]  -805.1039  -838.0366  -823.5354  -871.8192  -805.0244  -909.1456
## [1171]  -787.7132  -872.3597  -925.5009  -889.8245
predict(model1,data.frame(parity=1,age=25,smoke=0,gestation=286,height=62,weight=93),interval="confidence")
##        fit      lwr      upr
## 1 119.2306 116.7872 121.6741

Compare your calculated baby weight estimate to the actual value as obtained from the data file.

The actual value from the data file states that the baby weight for this mother would be 136 ounces. The calculated baby weight estimate is different however. It states that the baby weight for the mother would be 119 ounces instead.