Question

Use the R assignment and RStudio to answer the following questions. project 2 script.Ra Note: what is below applies to p-values only! NOTE: P-values like 2e-7 is 0.0000b02 If the p-value has a number beyond e-4, just write it as 0 l.e 3.2e-3-0.0032 1.04e-5 0 <2e-26 = 0 D Question 1 23 pts Question 1 The data set cars in R has data on distance (dist) and speed of various
media%2F411%2F41110429-1ea4-4a28-afac-76
media%2Fe8b%2Fe8bc01a0-8dbb-4893-a9b8-b3
media%2Fe3d%2Fe3ddf72b-1455-410c-8e47-9d
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please see the R code below


data("cars")
cars
##

fit <- lm(dist~speed, data=cars)
summary(fit)

## p[rediction

newdat <- data.frame(speed= c(6,21))

predict(fit,newdat)

# confidence interval for beta1

confint(fit,"speed",level=0.95)

The results are

summary(fit)

Call:

lm(formula = dist ~ speed, data = cars)

Residuals:

Min 1Q Median 3Q Max

-29.069 -9.525 -2.272 9.215 43.201

Coefficients:

Estimate Std. Error t value Pr(>|t|)   

(Intercept) -17.5791 6.7584 -2.601 0.0123 *  

speed 3.9324 0.4155 9.464 1.49e-12 *** as the p value is less than 0.05 , hence we reject the null hypothesis

---

Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 15.38 on 48 degrees of freedom

Multiple R-squared: 0.6511, Adjusted R-squared: 0.6438

F-statistic: 89.57 on 1 and 48 DF, p-value: 1.49e-12

> predict(fit,newdat)

1 2

6.015358 65.001489

> confint(fit,"speed",level=0.95)

2.5 % 97.5 %

speed 3.096964 4.767853

Add a comment
Know the answer?
Add Answer to:
Use the R assignment and RStudio to answer the following questions. project 2 script.Ra Note: what...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • FS2018 Home Announcements Syllabus Modules Assignments Grades People R Assignment 2 - Linear Regression Due Oct...

    FS2018 Home Announcements Syllabus Modules Assignments Grades People R Assignment 2 - Linear Regression Due Oct 26 at 11:59pm Time Limit None Points 59 Questions 2 Allowed Attempts Unlimited Instructions Use the R assignment and RStudio to answer the following questions project 2 script.R Note: what is below applies to p-values only! NOTE: P-values like 2e-7 is 0.0000002. If the p-value has a number beyond e-4, just write it as o. i.e. 3.2e-3-0.0032 1.04e-5-0 <2e-26 = 0 Write B1 0...

  • CSCI 359 Systems Analysis and Design Written Assignment #1 Answer each of the following questions for...

    CSCI 359 Systems Analysis and Design Written Assignment #1 Answer each of the following questions for 2 points. Submit all your answers in one file. Question 1: Propose a new meaningful project: give a name, definition and describe its scope as in a scope document (Your project proposals will be circulated in the class for creating new projects and forming project teams by the instructor). Question 2: What are the five phases of the SDLC? Question 3: What is the...

  • VQuestions Assignment Score: 11.8% Collapse ם Resources Hint Check Answer Press Esc to exit full screen...

    VQuestions Assignment Score: 11.8% Collapse ם Resources Hint Check Answer Press Esc to exit full screen Question 6 of 19> 6. Question The toco toucan, the largest member of the toucan family, possesses the largest beak relative to body size of all birds. This exaggerated feature has received various interpretations, such as being a refined adaptation for feeding. However, the large surface area may also be an important mechanism for radiating heat (and hence cooling the bird) as outdoor temperature...

  • Lock nsert Home Page Num Name Problem 2. (8 pts) Analyze the following circuit, and answer the following questions....

    Lock nsert Home Page Num Name Problem 2. (8 pts) Analyze the following circuit, and answer the following questions. Note that inputs are S, R and A. Clk is a clock signal input. Outputs are P and Q. N2 Clk N2 a) (4 pts) Assume that S-1, R-1. When Clk-0, what are the values or logic levels of N1, N2, P, and Q? b) (4 pts) Assume that S-1, R-1, and A-1. Immediately after Clk changes from 0 to 1,...

  • Week 6 Project Instructions Final Project For this assignment, use data from W1 Project Suppose you...

    Week 6 Project Instructions Final Project For this assignment, use data from W1 Project Suppose you have information that the average stress score of students in online universities is 13.15 using Minitab compute a one-sample test to find out whether the stress scores reported by your sample are significantly different fro the population of online students. Report you r analyses in APA format and write an APA-formatted interpretation of your results for each test Move your output into a 1-page...

  • Pulmonary Disease Note: You do not actually have to run analyses to answer these questions. Just...

    Pulmonary Disease Note: You do not actually have to run analyses to answer these questions. Just interpret the coefficients reported. The Data Set FEV.DAT on the Companion Website contains pulmonary function measures on 654 children ages 3-19 seen in East Boston, MA as part of Childhood Respiratory Disease (CRD) Study. The dataset contains data on age, sex, height (inches), FEV=volume (liters) of air expelled in 1 second, and smoking status. We first ran a regression of FEV on smoking shown...

  • Use the program listing below to answer the questions that follow. Note that this is not...

    Use the program listing below to answer the questions that follow. Note that this is not a working program. The intent of the assignment is for you to apply your knowledge of structural testing to answer the accompanying testing questions. 1. public static void main(String[] args) { 2. double a1 = 1.0; 3. double a2 = 2.0; 4. double a3 = 3.0; 5. if (cl) { 6. r1 = rate * 1.1; 7. r2 = rate * 2.1; 8. }...

  • Use the Minitab output to answer the following questions. 1. What is the estimated value of...

    Use the Minitab output to answer the following questions. 1. What is the estimated value of B2? 2. What is the value of SST? 3. What is the value of MSR? 4. What is the value of S2? 5. What is the predicted value of Y when X1 = 7, X2 = 5, and X3 = 3? (round your answer to two decimal places) 6. What is the residual for the predicted value in question 5? The value of Y...

  • Please answer all parts, use question #2 to solve #3. 2. For a random sample of...

    Please answer all parts, use question #2 to solve #3. 2. For a random sample of size n = 25, the correlation is r = 0.31 for normal random variables X and Y. Answer the questions for the hypothesis test. Use a level of significance of a = 0.08. Ho: p= 0 H1: p0 a. The critical value is Z = b. The test statistic is Z = C. The p-value is d. The hypothesis (should, should not) be rejected....

  • BACKGROUND The first part of this assignment focuses on the thermodynamics of enzyme-catalysed reactions. To answer the questions posed you will need apply the following two equations. Note that you...

    BACKGROUND The first part of this assignment focuses on the thermodynamics of enzyme-catalysed reactions. To answer the questions posed you will need apply the following two equations. Note that you may need to re- arrange these equations to determine the value you need. You also need to take care with the units of the values you use and determine. The first equation defines the relationship between the change in free energy (AG ") and the equilibrium between the products and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT