Assignment Task:


Description
## Run the following starter code first. This will load the relevant datasets and libraries. 
install.packages("car")
install.packages("reshape2")
library(car); library(reshape2)
data(Salaries)
library(ggplot2); library(lm.beta)
How many observations does the dataset salaries contain?   
  
QUESTION 2
What is the class of the variable, "sex"?

  1. Integer
  2. Numeric
  3. Character
  4. Factor
  5. 0.5 points   

QUESTION 3
Construct a scatter plot with yrs.service on the x-axis, salary on the y-axis, represent rank using color and draw lines through the points. Hint: Lookup up geom_point, geom_smooth at http://docs.ggplot2.org/current/. If you are unable to figure it out, you may run this code. 

ggplot(data=Salaries,aes(x=yrs.service,y=salary,color=rank)) +  geom_point() +  geom_smooth(method="lm",size=1.1,se=F)
Now, answer the following question:
With years of service, the salary of Assistant Professors

  1. goes down
  2. remains the same
  3. goes up  


QUESTION 4
Using the plot constructed for the last question, answer the following question:
With years of service, the salary of Associate Professors

  1. goes down
  2. remains the same
  3. goes up

   
QUESTION 5
Using the plot constructed for the last question, answer the following question:
With years of service, a salary of Professors

  1. goes down
  2. remains the same
  3. Goes up

   
QUESTION 6
Construct a linear regression model to predict salary using sex. Let's call this model1. Does sex affect salary?

  1. Yes
  2. No   

QUESTION 7
What is the R2 for model1? (Enter the number as in the output) _____________
  
QUESTION 8
Construct a linear regression model to predict salary using all the variables except discipline. Let's call this model, model2. What is sse for model2? 
Here is some code that can be used to compute sse (sum of squared errors) for a regression model called model where the variable to be predicted is data$salary
pred = predict(model)
sse = (pred - data$salary)^2
_______________
   
QUESTION 9
What is the R2 for model2? (print answer as in output; do not round) ___________
 
QUESTION 10

Associate Professors earn significantly more than Assistant Professors

  1. True
  2. False

   
QUESTION 11
Professors earn significantly more than Assistant Professors

  1. True
  2. False

QUESTION 12
Based on the model, what is the predicted salary of Dr. Vishal Lala? He is a Professor, it has been 11 years since he received his Ph.D. and he has 10 years of service. (Answer as 123456.3 NOT $123,456.30) ______________
  
QUESTION 13
Based on the model above, would a Professor with more than 46 years experience receive a low salary or high salary

  1. Low
  2. High
  3. Not enough information to answer the question

This Computer Science Assignment has been solved by our Computer Science Experts at UniLearnO. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our experts are well trained to follow all marking rubrics & referencing style.

Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.

 

Eureka! You've stumped our genius minds (for now)! This exciting new question has our experts buzzing with curiosity. We can't wait to craft a fresh solution just for you!

  • Uploaded By : Mia
  • Posted on : March 01st, 2019

Whatsapp Tap to ChatGet instant assistance