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.

Elementary Geometry For College Students, 7e
7th Edition
ISBN:9781337614085
Author:Alexander, Daniel C.; Koeberlein, Geralyn M.
Publisher:Alexander, Daniel C.; Koeberlein, Geralyn M.
Chapter1: Line And Angle Relationships
Section1.CR: Review Exercises
Problem 3CR: Name the four characteristics of a good definition.
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
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Elementary Geometry For College Students, 7e
Elementary Geometry For College Students, 7e
Geometry
ISBN:
9781337614085
Author:
Alexander, Daniel C.; Koeberlein, Geralyn M.
Publisher:
Cengage,
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,