Classwork_08_codes.pdf - PSY 3020 F19 – S Han[Classwork 08 codes 1 TextbookCosts$AvgCost < TextbookCosts$Cost/TextbookCosts$Books After running the

Classwork_08_codes.pdf - PSY 3020 F19 – S Han[Classwork...

This preview shows page 1 - 2 out of 4 pages.

PSY 3020, F19 S. Han [Classwork 08 - codes] Page 1 of 4 1. TextbookCosts$AvgCost <- TextbookCosts$Cost/TextbookCosts$Books After running the codes above, check whether or not the new variable ( AvgCost ) is successfully added to TextbookCosts , by either str(TextbookCosts) or head(TextbookCosts) 2. str(TextbookCosts) You can also use the descriptions provided in the handout for the three original variables. 3. For Q0, Q1, Q2, Q3, Q4, and the mean, favstats(TextbookCosts$Books) or favstats(~ Books, data = TextbookCosts) favstats(TextbookCosts$Cost) or favstats(~ Cost, data = TextbookCosts) favstats(TextbookCosts$AvgCost) or favstats(~ AvgCost, data = TextbookCost) IQR can be either manually calculated using the values of Q3 and Q1, or iqr() The cut-points can be manually calculated using the values of Q1, Q3, and IQR. After finding the cut-points (i.e., cut-point for large outliers and cut-point for low outliers), use arrange() to arrange the data set (i.e., TextbookCosts ) by each variable and count the values that are either above the large outlier or below the small outlier. You need to run arrange() three times, i.e., arrange(TextbookCosts, Books) arrange(TextbookCosts, Cost) arrange(TextbookCosts, AvgCost) 4. You don t need to run any new R codes. However, you need to calculate the value of AvgCost for Shin.
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 4 pages?

  • Fall '18
  • Joel Ellwanger

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors