Write out your answers to questions in complete sentences. Include all relevant R code and output, without anything extraneous. Instead of importing in an external.csv dataset to analyze, we'll use a dataset that exists in an R package for this problem. Follow these steps to import the necessary dataset: Run this code to open the "car" package, which contains the dataset: > library(car) > my_eid <- Wong 3. The Wong dataset contains data from a study by Wong, Monette, and Weiner (2001) on sample of patients who fell into comas after sustaining traumatic brain injuries. After waking, Wong and colleagues administered various intelligence tests. The "duration" variable records how many days each patient was in a coma. You want to see if there is a change in performance IQ scores ("piq") as duration increased. a. Make a scatterplot for this analysis. Why is a linear regression not appropriate? b. Create a new variable in the data frame called "log_duration" that is the natural log of each duration value plus 1 (so that duration values of zero are defined). You may use the code template below, changing the "UPDATE" portions as needed > UPDATE <- log(UPDATE + 1) c. Assuming this data is a random sample of the population and the observations are independent, conduct an analysis to see if log-duration can predict piq.
Write out your answers to questions in complete sentences. Include all relevant R code and output, without anything extraneous. Instead of importing in an external.csv dataset to analyze, we'll use a dataset that exists in an R package for this problem. Follow these steps to import the necessary dataset: Run this code to open the "car" package, which contains the dataset: > library(car) > my_eid <- Wong 3. The Wong dataset contains data from a study by Wong, Monette, and Weiner (2001) on sample of patients who fell into comas after sustaining traumatic brain injuries. After waking, Wong and colleagues administered various intelligence tests. The "duration" variable records how many days each patient was in a coma. You want to see if there is a change in performance IQ scores ("piq") as duration increased. a. Make a scatterplot for this analysis. Why is a linear regression not appropriate? b. Create a new variable in the data frame called "log_duration" that is the natural log of each duration value plus 1 (so that duration values of zero are defined). You may use the code template below, changing the "UPDATE" portions as needed > UPDATE <- log(UPDATE + 1) c. Assuming this data is a random sample of the population and the observations are independent, conduct an analysis to see if log-duration can predict piq.
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
100%
Helppppppp::/$;$;&(&(&(&;&;&;&&&;&;&(&(&;&;&(&(&(&;@;&((&;:&:@(&(&;&@;
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 4 images
Recommended textbooks for you
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman