Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following data set coming from the MASS package (the data set will appear under the name Wage on the top right hand comer.

image text in transcribedimage text in transcribed
Consider the following data set coming from the MASS package (the data set will appear under the name "Wage" on the top right hand comer. Make sure you install the MASS package first) # install. packages( "MASS") library (MASS) data (birthwt) head (birthwt ) low age Iwt ace smoke pti ht LII fty int> 85 19 182 2 0 0 0 1 86 0 33 155 3 0 O 0 3 87 0 20 105 1 O 1 88 0 21 108 0 N 18 107 O 91 0 21 124 3 0 0 0 6 rows | 1-10 of 11 columns Each observation in the data set is a mother for which we observe several variables during pregnancy: but is the weight of the baby at birth in grams low is a binary variable equal to 1 if the baby weighs less than 2,500 grams, and 0 otherwise age is the age of the mother ht is a binary variable for a history of hypertension smoke is a binary variable equal to 1 if the mother is a smoker, and 0 otherwise a. Compute (and show) the average weight of a baby whose mother is a smoker (call it bwtbar_s) and the average weight of a baby whose mother is not a smoker (call it bwtbar_ns). Compute the difference in these averages weights (call it dhat) and compute the estimated standard deviation of the difference (call it sd_d). Answers to assignment 2 might be useful. (3 points) Answer: # Answer here (b. Test the hypothesis that the true difference in average baby weights between smokers and non smokers, d, is equal to 0 against the alternative that it is different from 0 with a significance level of 5%. Show your computations in R and clearly state your decision to reject or not reject. (3 points) Answer: # Answer here (C. ) Construct a 95% confidence interval for d. (2 points) Answer: # Answer here(d. ) We are interested in the effect of smoking during pregnancy on the average weight of the baby. In order to answer this question, regress the weight of the baby on the smoking status of the mother. What is the estimated effect of smoking on the weight of the baby? Is the baby of a smoking mother expected to be heavier or lighter than that of a non smoking mother? Show your results and compare with your answer in (a.). (3 points) Answer: # Answer here (e. ) We say that a variable is significant when we reject the hypothesis that the associated coefficient is equal to 0. Test that hypothesis for the variable smoke with a significance level of 5% and conclude whether this variable is significant or not. Show your results. (2 points) (f. ) Construct a 95% confidence interval for the coefficient associated to the variable smoke without any R function (hint: You know the asymptotic distribution of What beta}_1\\). (2 points) Answer: # Answer here (g. ) Create a variable called but_/b that is equal to the weight of the baby in pounds (1 gram = 0.0022 lbs). The variable should be included in the data set (the mutate function from the dplyr package might be useful but you don't have to use it necessarily). Regress the weight in pounds on the smoking status. Compare your estimates with the ones in (d.). What do you notice? (3 points) Answer: # Answer here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Probability

Authors: Mark Daniel Ward, Ellen Gundlach

1st edition

716771098, 978-1319060893, 1319060897, 978-0716771098

Students also viewed these Mathematics questions

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago