WhatsApp Us: at +1 (601) 456-5517
Reach us at: nursinghomeworkservices@gmail.com
Psychology R Studios Task
R1
Throughout this course we will be using RStudio as our environment for working with the R programming language. Please refer to M0: Succeeding in This Course for R and RStudio download instructions.
Before you begin this assignment, make sure that you have reviewed the R videos on this module’s presentation page. You will also find helpful information for getting started with R from Chapter 3 from the Auerbach and Zeitlin text.
When you are ready to begin, complete the following steps for this module’s R assignment:
Review the description of the hospital dataset from the Auerbach and Zeitlin text (see pages 41 and 42).
Download and open the hospital dataset Download and open the hospital dataset and complete the following in RStudio:
Use the Hims package to determine the percentages for the gender variable and record these percentages in a document.
Use the psych package to determine the mean (average) age of patients and record these results in a document.
For examples, see pages 99, 100, and 104–106 in the Auerbach and Zeitlin text.
Requirements
Upload the following by the deadline post on this page:
A screenshot of RStudio showing that you have installed the models, Hims, and psych packages
A document with the following information from the hospital dataset:
The percentages of the gender variable
The mean age of patients.
——————————————————————————————————————–
Psychology R Studios Task
R2
Complete the following steps for this module’s R assignment:
A director of research at an acute care hospital observes an increase in the number of patients returning to the hospital within 30 days. The director determines that this is harmful to patients and harmful financially to the hospital. The dataset hospital Download hospital contains data on a study the director conducted to determine which factors are related to returning to the hospital in 30 days. You can find a description of the variables in the file on pages 40 and 41 in the Auerbach and Zeitlin text.
Check tips on how to do your Psychology Assignment.
Using the Cross Tables () function in the model’s package, create a table comparing “return30” and “gender.” Then, use the data in your table to answer the question: Who is more likely to return within 30 days?
Refer to pages 43-45 in the Auerbach & Zeitlin text (Recoding Data) to create a variable: “age80.”
Using the Cross Tables () function in the models package, create a table comparing “return30” and “age80.” Then, use the data in your table to answer the question: Who is more likely to return within 30 days?
Copy and paste your tables from RStudio and findings into a Word document. Use 10-point, Courier font.
Upload your findings.
Note: When you use age80 in the Crossable () function do not use the syntax hospital$age80. Leave off the “hospital$.” You will still need to include hospital$ with return30. The reason for this is that age80 is not part of the hospital data frame. Refer to pages 46-47 in the Auerbach & Zeitlin text (saving your transformation) to attach your transformation to your data frame.
Requirements
Upload your data tables and your findings by the deadline posted on this page.
Your work should be submitted in a document with 10-point, Courier font.
This assignment will be graded on the basis of completion.
Psychology R Studios Task
————————————————————————————————————————–R3
Complete the following steps for this module’s R assignment. Please note, the hospital1 data set, which is downloadable via the link in the instructions below, will be used for other R assignments later on in this course.
A director of research at an acute care hospital observes an increase in hospital length of stay (loss). The director determines that this is harmful to patients and also harmful financially to the hospital. The dataset hospital1Download hospital1contains data on a study the director conducted to determine which factors are related to longer lengths of stay.
Refer to your textbook and also the R screencast videos on this module’s lecture page for examples.
Using the describe By() function in the psych package create a table comparing “spouse” to “loss.” Then, use the data in your table to answer the following question: Which group has the higher mean/average length of stay (loss)?
Copy and paste your tables from RStudio and findings into a Word document. Use a 10-point, Courier font.
Create a box plot comparing “spouse” to “loss” (see p. 83 in the Auerbach and Zeitlin text). Then, interpret your findings by describing what you see in the box plot (see: page 98 in the Auerbach and Zeitlin text).
Copy and paste your findings into the same Word document as you did above in Item 2. Copy and paste the graph to the Word document as well (see: the “Introduction to R Graphics” video on this module’s lecture page).
Upload your findings.
Requirements
Upload your data tables and your findings by the deadline posted on this page.
Your work should be submitted in a document with 10-point, Courier font.
This assignment will be graded on the basis of completion.
————————————————————————————————————————-R4
Complete the following steps for this module’s R assignment.
In this assignment you will enter data into a spreadsheet. You can use any spreadsheet software that can save data in .csv format (Excel, Numbers, Google Docs). Excel is utilized in this module’s lecture video on entering data.
Complete the following steps:
For examples, see pages 52–56 in the Auerbach and Zeitlin text and this module’s lecture video on entering data.
Select the first five variables from the codebook on page 53 in the Auerbach and Zeitlin text to create a spreadsheet.
Enter the data displayed in the table below. IDgenderagejobleave112522223431324212412322515611
Save your spreadsheet in .csv format.
Import the data into R (see page 56 in the Auerbach and Zeitlin text).
Save the file in R format (see page 59 in the Auerbach and Zeitlin text).
Upload the R and spreadsheet files through this assignment page.
Requirements
Upload your R file and your spreadsheet (in .csv format) by the deadline posted on this page.
This assignment will be graded on the basis of completion.
————————————————————————————————————————–
Psychology R Studios Task
R5
Complete the following steps for this module’s R assignment.
A director of research at an acute care hospital observes an increase in patients returning to the hospital within 30 days. The director determines that this is harmful to patients as well as financially harmful to the hospital. The dataset hospital1 Download hospital1contains data on a study the director conducted to determine what factors are related to returning to the hospital within 30 days. The director wants to test the hypothesis that patients with and without spouses are not equally likely to return within 30 days. The null hypothesis would be that patients with and without spouses are equally likely to return to the hospital within 30 days.
Refer to your textbook and also the R screencast videos on this module’s lecture page for examples.
See pages 111–123 in the Auerbach and Zeitlin text and the chi-square video on this module’s lecture page for examples.
Using the Crossable () function in the model’s package, create a table comparing “spouse” to “return30.” Interpret the findings you see. Specifically, were the criteria for rejection of the null hypothesis (H0) met? How can you tell?
Copy your table from RStudio and your findings to Word document. Use size-10 Courier font.
Upload your findings.
Requirements
Upload your data table and your findings by the deadline posted on this page.
Your work should be submitted in a document with 10-point Courier font.
This assignment will be graded on the basis of completion.
—————————————————————————————————————————-R6
Psychology R Studios Task
Complete the following steps for this module’s R assignment.
A director of research at an acute care hospital observes an increase in hospital lengths of stay (loss). The director determines that this is harmful to patients as well as financially harmful to the hospital. The dataset hospital1 Download hospital1contains data on a study the director conducted to determine what factors are related to longer lengths of stay.
Refer to your textbook and also the R screencast videos on this module’s lecture page for examples.
Calculate a t-test to test the null hypothesis that patients above and below the age of 80 (age80) have equal lengths of stay (loss).
Using the describe By () function in the psych package, create a table comparing “agata” to “loss.” Interpret the findings you see. Which group has the highest mean/average length of stay (loss)?
Use ANOVA to test if these differences are significant.
Can you reject the null hypothesis? Explain how you know.
Conduct a Tukey’s post-hoc to compare groups.
Which groups are significantly different?
Using the co. Test () function, test for a relationship between “loss” and instrumental activities of daily living (Tieleman).
Copy your table and findings to a Word document; use size-10 Courier font.
Upload your findings.
Requirements
Upload your data table and your findings by the deadline posted on this page.
Your work should be submitted in a Word document with 10-point Courier font.
This assignment will be graded on the basis of completion.