Question

In: Math

1. Using the 'pulp' data from the faraway package in R, determine whether there are any...

1. Using the 'pulp' data from the faraway package in R, determine whether there are any differences between the operators. What is the nature of these differences? (Note; You must do multiple comparisons). Please use R or R studio code. Thanks!

Solutions

Expert Solution

> library(faraway) #loading library 'FARAWAY'
> pulp
bright operator
1 59.8 a
2 60.0 a
3 60.8 a
4 60.8 a
5 59.8 a
6 59.8 b
7 60.2 b
8 60.4 b
9 59.9 b
10 60.0 b
11 60.7 c
12 60.7 c
13 60.5 c
14 60.9 c
15 60.3 c
16 61.0 d
17 60.8 d
18 60.6 d
19 60.5 d
20 60.5 d
> attach(pulp)
> model=aov(bright~operator) #Fitting One-way ANOVA
> summary(model)
Df Sum Sq Mean Sq F value Pr(>F)  
operator 3 1.34 0.4467 4.204 0.0226 *
Residuals 16 1.70 0.1063
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Since p-value = 0.0226 < 0.05, we reject the null hypothesis of no difference among the operators and conclude that there is significant difference among the operators.
#Post ANOVA - Tukey HSD test
> TukeyHSD(model)
Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = bright ~ operator)

$operator
diff lwr upr p adj
b-a -0.18 -0.76981435 0.4098143 0.8185430
c-a 0.38 -0.20981435 0.9698143 0.2903038
d-a 0.44 -0.14981435 1.0298143 0.1844794
c-b 0.56 -0.02981435 1.1498143 0.0657945
d-b 0.62 0.03018565 1.2098143 0.0376691
d-c 0.06 -0.52981435 0.6498143 0.9910783

Out of all the pairs, we observe that the pair(b,d) is significantly different since the p-value is less than 0.05 and all the others are > 0.05.


Related Solutions

I am using the phbirths data in the faraway package in R. I want to: 1)...
I am using the phbirths data in the faraway package in R. I want to: 1) create a plot of the birth weight vs the gestational age and I want to colour code the points based on the mothers smoking status to determine whether or not smoking affects the babies. 2) fit a simple model (one regression line) along with both the main effects (parallel lines) and interaction (non parallel lines) ANCOVA model to the data and find out which...
1. The dataset prostate (in R package ”faraway”) is from a study on 97 men with...
1. The dataset prostate (in R package ”faraway”) is from a study on 97 men with prostatecancer who were due to receive a radical prostatectomy.Fit a model withlpsa(y) as the response variable andlcavol(x) as the predictor andanswer the following question: •Calculate and plot the 90%confidenceandpredictionbands. Which type ofintervals are wider?
Using the Motor Trend Car Road Tests dataset mtcars, in faraway R package, fit a model...
Using the Motor Trend Car Road Tests dataset mtcars, in faraway R package, fit a model with mpg: Miles/(US) gallon as the response and the other variables as predictors. (a) Which variables are statistically significant at the 5% level? For each and every test provide the null and alternative hypotheses, critical region (or rejection region), test statistics and your conclusions. (30) (b) What interpretation should be given to the coefficient for vs: Engine? (3) (c) Compute 90 and 95% confidence...
The data can find in potuse (faraway package). The national Youth Survey collected a sample of...
The data can find in potuse (faraway package). The national Youth Survey collected a sample of 11-17 year-olds with 117 boys and 120 girls, asking questions about marijuana usage. This data is actually longitudinal – the same boys and girls are followed for five years. However, for the purposes of this question, imagine that the data is cross-sectional, that is, a different sample of boys and girls are sampled each year. Build a model for the different levels of marijuana...
Using the package “wooldridge’, and the data ‘hprice1’ (in R-Software) to estimate the model price =...
Using the package “wooldridge’, and the data ‘hprice1’ (in R-Software) to estimate the model price = β0 + β1sqrft + β2bdrms + u , where is the house price measured in thousands of dollars. 1. Write out the results in equation form. 2.  What is the estimated increase in price for a house with one more bedroom, holding square footage constant? 3. What is the estimated increase in price for a house with an additional bedroom that is 140 square feet...
Please use R to do it. Using the SATGPA data set in Stat2Data package. Test by...
Please use R to do it. Using the SATGPA data set in Stat2Data package. Test by using α= .05 Question: Test if the proportion of MathSAT greater than VerbalSAT is 0.60 > library(Stat2Data) > data("SATGPA") > data(SATGPA) > SATGPA
Before conducting any statistical tests on her data, a hydrologist wanted to determine whether the data...
Before conducting any statistical tests on her data, a hydrologist wanted to determine whether the data were skewed. She determined that the mean of the data was 38.75 m/s, the median was 40.42 m/s and the standard deviation was 2.75 m/s. Using Pearson’s index of skewness, he concluded: A. the data were significantly skewed in the negative direction B. the data were not significantly skewed in the negative direction C. the data were significantly skewed in the positive direction D....
USING R ---locate the pre-loaded MASS package, then load the data frame cats within that packag....
USING R ---locate the pre-loaded MASS package, then load the data frame cats within that packag. This provides data on sex, body weight (in kgs), and heart weight (in grams) for 144 household cats. Load the MASS package with a call to library("MASS"), and access the object directly by entering cats at the console prompt. 1. Fit a least-squares multiple linear regression model using heart weight as the response variable and the other two variables as predictors, and view a...
Montgomery gathered data on an experiment in paper production to determine the effects of pulp cooking...
Montgomery gathered data on an experiment in paper production to determine the effects of pulp cooking time (having two levels: 3 hours and 4 hours), vat pressure (having three levels: 400, 500, and 650), and percent of hardwood concentration (having three levels: 2, 4, and 8) on the response variable: paper strength. DO THE QUESTION IN SAS. PLEASE INCLUDE YOUR CODE TO GET THE ANSWER. (a) Fit a three-way ANOVA, including ALL possible interaction terms. At a 5% significance level,...
1. Using the data from the Coffee & Cocoa Company, (a) determine the divisional income from...
1. Using the data from the Coffee & Cocoa Company, (a) determine the divisional income from operations for the THREE regions by allocating the service department expenses proportional to the sales of the regions (b) determine the increase or decrease in net income if C Region did not operate. A Region - B Region - C Region Sales $600,000 - $900,000 - $300,000 Cost of goods sold $200,000 - $350,000 - $190,000 Selling Expenses $150,000 - $275,000 - $100,000 Service...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT