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
icon
Related questions
Question
100%
Helppppppp::/$;$;&(&(&(&;&;&;&&&;&;&(&(&;&;&(&(&(&;@;&((&;:&:@(&(&;&@;
●
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
a 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.
Transcribed Image Text:● 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 a 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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
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 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…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
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
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman