Assignment Task:
Task:
Use tidyverse package when appropriate.
Need Help Writing an Essay?
Tell us about your assignment and we will find the best writer for your paper.
Get Help Now!BACKGROUND (this is a fake scenario):
Surveys were sent
to over 700 college seniors representing 23 major universities in the United States. These are all students who are preparing to graduate this spring. Each student completed a short (14-item) Likert-type survey. The purpose of the survey was to determine their optimism regarding their readiness and likelihood of obtaining a job after graduation that is consistent with their education and professional goals.
“““““““““““`
RESEARCH QUESTIONS to be answered:
·Is senior-year grade point average (GPA) related to the degree of optimism about future employment?
·Is the relationship of GPA and optimism consistent or different for different categories of disciplines?
·Is the level of optimism different for different categories of disciplines?
“““““`
Description of 3 data files:
1.Job Prep Demographics
This file contains information on all students who consented to be in the study. We have assigned each participant a unique three-digit ID to protect student confidentiality. We have also assigned each university a school code, also to maintain their anonymity. For each student you will find their age and gender. This information has been categorized under five general categories: humanities (includes arts, history, philosophy, etc.), social sciences (includes anthropology, psychology, sociology, etc.), natural sciences(includes biology, chemistry, physics, etc.), formal sciences (includes mathematics, statistics, and computer science), and applied sciences (includes business, engineering, and medical disciplines).
2.Job Prep GPA Data
This file contains the same information as the job prep demographics file, excepting discipline category. It also contains the first and second semester GPAs of the students during their senior year, as well as how many credits they took each of these semesters. We thought that the average of the two semester GPAs might be the best measure to use as an indicator of academic performance when answering the first two research questions.
3.Job Prep Survey Results
This file includes the assigned ID followed by the responses on each of the 14 Likert items using a six-point scale. After accounting for reverse-scored items (items # 4, 9, 12, and 13), we use the sum as an indicator of optimism about future job prospects, with higher scores indicating greater optimism that after graduation the student will find a job that matches their educational attainment and expectations. Obviously not every student who consented to be in the study returned a survey, but we were quite pleased with the response rate of 72%.
“““““““““““““““““`
ADDITIONAL INSTRUCTIONS:
Use subfolders and file names to identify what is in each file.
Data were keyed in by hand, so carefully check both primary and foreign keys. Do not average first and second semester GPAs unless first verifying consistency. Visually examine consistency.
Exclude those students who are among those with the ten percent largest residuals when predicting second semester GPA from first semester GPA so that we can be more comfortable about averaging the two semesters. Highlight this in a graph to better explain the issue.
When you average GPAs, use a weighted average based on the number of credits taken in a semester. When comparing job preparation perception across discipline categories, first test the omnibus hypothesis about mean equality, but then construct confidence intervals for all pairwise differences. Keep our total confidence at 95% for all inferences.
“““““““““““
WRITE 2 FUNCTIONS
1. Researchers use surveys based on the Likert scale. A survey item will ask the respondent to respond on a specified scale (such as 1 to 6) to indicate where the respondent self-reports level of intensity when measuring an attribute such as agreement, preference, or importance. The survey consists of multiple items and the total score is based on summing across items. This score is meant to reflect the respondent’s placement on a construct scale. Two examples would be a survey to assess beliefs about gun control or a survey to assess desire to obtain an advanced educational degree. To increase the validity of the scale, some items should be written so that the scale is reversed. That is, a high score on the item will make a small contribution to the total score and a low score will make a large contribution. Such items are called “reverse scored” items. For example, on a six-point scale, a response of “2”will be scored as “5.”Write a function that will compute the total score for respondents on a Likert scale. Your function should accept three required arguments: a data frame with the individual itemresponses (as usual, individuals in rows and items in columns), a numeric with the scaleused for the items (e.g., you would send “6” if the items were on a six-point scale), and a numeric vector indicating which item numbers should be reverse scored. Your function should return a data frame that is the original data frame with an additional column added to the end that contains the score for each respondent.
2. Write a function that accepts (1) a quantitative response variable, (2) a quantitative explanatory variable, and (3) a number. Suppose we denote the response variable as y, the explanatory variable as x, and the number as p. Your function should model y as a linear function of x and then for each (x, y) pair determine if the residual is one of the p largest in the set of residuals, with largest defined in terms of absolute value (e.g., a residual of -10 is just as large as a residual of 10). The function should return a logical vector indicating TRUE for each pair that has one of the pth largest residuals and FALSE otherwise.
Welcome to Our Online Academic Writing Service. Our online assignment writing website provide various guarantees that will never be broken. No matter whether you need a narrative essay, 5-paragraph essay, persuasive essay, descriptive essay, or expository essay, we will provide you with quality papers at student friendly price.
Ask for Instant Writing Help. No Plagiarism Guarantee!


