Data Exercise #2
The dataset for this exercise is named “temp2” saved in Excel
spreadsheet. There are two columns, one is “employee_satisfaction”
and the other is “productivity”. “employee_satisfaction” is an
index ranging from 1 to 5 that measures employee satisfaction.
“productivity” is an index ranging from 1-100 that measures
productivity of the employees. Load this dataset in RStudio.
(10pts)
Get the correlation coefficient between “employee_satisfaction” and
“productivity”. (Hint: You will have to instruct R to ignore the
NA’s or to use the observations that are not NA’s. You must perform
this step in R, and should not change the raw data from Excel.)
(20pts)
Create a binary variable “high_productivity” based on
“productivity”. Give “high_productivity” a value of one if
“productivity” is greater than 50, otherwise, a zero. (Hint: use
the “ifelse” command.) (20pts)
4. Get a frequency table for
“high_productivity”. (Hint: Use the “table” command.) A frequency
table from R should look something like this: (20pts) *table shown
in picture
5. In RStudio, run a regression
of productivity on employee_satisfaction, and use the “summary”
command to show the regression results. (20pts)
6. Indicate where the slope
coefficient is and where R square is. (10pts)
Note: Take photos or screenshots of everything you have in your
RStudio window including all the commands and all the outputs.
Please make sure the photos or screenshots are clear enough to
read. You can submit the photos or the screenshots directly in
Blackboard, or paste them into a Word document and upload the Word
document. If you use Pages with a Mac, please convert your Pages
document into a PDF.
Data Exercise #2 1. The dataset for this exercise is named “temp2" saved in Excel spreadsheet. There are two columns, one is “employee_satisfaction" and the other is productivity". "employee_satisfaction is an index ranging from 1 to 5 that measures employee satisfaction productivity” is an index ranging from 1-100 that measures productivity of the employees. Load this dataset in RStudio (10pts) 2. Get the correlation coefficient between “employee_satisfaction” and “productivity”. (Hint: You will have to instruct R to ignore the NA's or to use the observations that are not NA's. You must perform this step in R, and should not change the raw data from Excel.) (20pts) 3. Create a binary variable "high productivity“ based on productivity“. Give "high_productivity" a value of one if productivity is greater than 50, otherwise, a zero. (Hint: use the "ifelse" command.) (20pts) 4. Get a frequency table for "high_productivity". (Hint: Use the "table" command.) A frequency table from R should look something like this (20pts) 1 counts counts 5. In RStudio, run a regression of productivity on employee_satisfaction, and use the "summary" command to show the regression results. (20pts) 6 Indicate where the slope coefficient is and where R square is. (10pts) Note: Take photos or screenshots of everything you have in your RStudio window including all the commands and all the outputs. Please make sure the photos or screenshots are clear enough to read. You can submit the photos or the screenshots directly in Blackboard or paste them into a Word document and upload the Word document If you use Pages with a Mac, please convert your Pages document into a PDF
employee satisfacti productivity 13 45 ਦੇ ਬੜੇ 5 6 10 151 27 67 12 58 8 61 51 t & NA 61 SEG .. 高圣兰监 = 0 M N O UN 22 42 1 52 11 78 ON 50 51 52 58 5 17 80 55 58 37 94 Sheet1
1 95 59 3 09 2 69 73 65 2 4 1 2 OL 21 on To 2 NA NO 64 75 75 2 = 2 2 8 + UNE 84 16 888.81 222 Π Ν Ν Ν Ι Η ΓΥ ΓΙΑ ΤΗ ΓΙΟ ΓΙΑ SRS SENSR88888.8 106 107 108 SOL 110 LEN al 3 Sheet1
5 ti 40 1115 1 44 2012 4 5 32 5 1 WA 54 73 57 2 5 124. 34 4 4 196 4 St Dan + N2 1 5 76 128 199 180 181 102 103 H 5 156 t 3 1 S8888889982984883.8 GN98-9909 na 112 1 5 4 4 4 1 4 15 5 5 2 4 86 956 197 161 2 5 4 A 1 4 1 4 5 2 54 58 100 163 164 165 188 187 2 26 188 2 80 Sheet1 G Wma
no 1 32 52 25 95 At LAN & Z 2 SITHIN 7 * 21 El 11 F BE Sheet1 G
Data Exercise #2 1. The dataset for this exercise is named “temp2" saved in Excel spreadsheet. There are two columns, on
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Data Exercise #2 1. The dataset for this exercise is named “temp2" saved in Excel spreadsheet. There are two columns, on
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!