Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

R Assignment Factors Part 1: What is factor in R? Part 2: Assume that the temper

ID: 3873937 • Letter: R

Question

R Assignment

Factors

Part 1:
What is  factor in R?

Part 2:
Assume that the temperature at which a manufacturing plant is maintained is believed to affect the rate of the production in the plant. Consider the data in the following table which shows the temperature and the production rates for four products:



Which of the column data is a candidate to be defined as a factor? Why?

temperature product1 product2 product3 product4 60 20 23 23 4 60 19 22 19 8 70 18 11 1 10 60 20 22 7 7 70 22 33 3 8 60 12 33 11 6 60 33 88 23 10 70 23 33 19 7 60 4 22 1 8 70 5 33 7 6 80 6 33 3 23 80 20 33 11 19 80 19 7 33 1 80 18 4 23 7 80 20 11 4 3 80 22 33 5 11 60 12 11 6 33 70 33 3 20 23 60 23 22 19 4 70 4 6 18 5 80 5 5 20 6 80 6 5 44 20

Explanation / Answer

Factor in R:

1. They are limited number of unique values.
2. These often refered as categorical variables.
3. They are useful in data analysis for statistical modeling.

Part 2:

Product 2 was defined as a factor.


Because they are very unique when compared to remaining columns

In product 2 most of the values are multiple of 11. i.e. it specific a category.

Most of the values are unique values

So product 2 column will follow factor in R rule