Question

On R-studio Run the following starter code first. This will load the relevant datasets and libraries....

On R-studio

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)

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 questions:

A. With years of service, salary of Assistant Professors

A. goes down

B. remains the same

       c.  goes up

B. Using the plot constructed for the last question, answer the following question:

With years of service, salary of Associate Professors

A. goes down

B. remains the same

C. goes up

C. Using the plot constructed for the last question, answer the following question:

With years of service, salary of Professors

A. goes down

B. remains the same

C. Goes up

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer for Question A: option c

With years of service, salary of Assistant Professors goes up.

From the plot we can see the red line, which has +ve slope. which means increasing

Answer for Question B: option A

With years of service, salary of Associate Professors goes down

From the plot we can see the green line, which has -ve slope. which means increasing

Answer for Question c: option B

With years of service, salary of Professors remains the same

From the plot we can see the blue line, which is nearly parallel to x -axis, which means it remains same

Add a comment
Know the answer?
Add Answer to:
On R-studio Run the following starter code first. This will load the relevant datasets and libraries....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • ## Run the following starter code first. This will load the relevant datasets and libraries. install.packages("car")...

    ## 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) Question A How many observations does the dataset salaries contain? __________ QUESTION B What is the class of the variable, "sex"? Integer Numeric Character Factor

  • Can Technology Save Sears? Sears, Roebuck used to be the largest retailer in the United States, w...

    Can Technology Save Sears? Sears, Roebuck used to be the largest retailer in the United States, with sales representing 1 to 2 percent of the U.S. gross national product for almost 40 years after World War II. Since then, Sears has steadily lost ground to discounters such as Walmart and Target and to competitively priced specialty retailers such as Home Depot and Lowe’s. Even the merger with Kmart in 2005 to create Sears Holding Company failed to stop the downward...

  • Luisa Fernandez pulled into a parking spot behind one of Superado’s stores on the outskirts of Seville but paused before...

    Luisa Fernandez pulled into a parking spot behind one of Superado’s stores on the outskirts of Seville but paused before getting out of the car. This was usually the best part of her week—visiting one of her company’s supermarkets, talking to the store manager, walking through the aisles, watching employees interact with the customers. She’d been doing it since she was a little girl, tagging along with her father as he grew his business from one small market in central...

  • Direction: review the eassy prof it and summerize it. Add thesis with it. make changes if...

    Direction: review the eassy prof it and summerize it. Add thesis with it. make changes if posible Title The coporate puzzel When all you believe is people behind you until they turn their back on you. Times are hard when you are not to be worried about anything in life. I had a great job with a very working paid. Things were going smoothly until one day I had a call to my manager’s office saying he will like to...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

  • Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around...

    Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...

  • Hi there! I need to compare two essay into 1 essay, and make it interesting and...

    Hi there! I need to compare two essay into 1 essay, and make it interesting and choose couple topics which im going to talk about in my essay FIRST ESSAY “Teaching New Worlds/New Words” bell hooks Like desire, language disrupts, refuses to be contained within boundaries. It speaks itself against our will, in words and thoughts that intrude, even violate the most private spaces of mind and body. It was in my first year of college that I read Adrienne...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT