1. Two medications, medication A and medication B, are used in conjunction to tr
ID: 3047829 • Letter: 1
Question
1. Two medications, medication A and medication B, are used in conjunction to treat high blood pressure. We are intcrested in understanding the effect of these medication have on systolic blood pressure. A number of middlc-aged men take differing dosages of cach medication for 12 wecks, and then have their systolic blood pressures measured B 2.5 mg B 10 mg B 20 mg B 40 mg 5mg A 10 g136 A 20 g 130 A 40 g125 (a) Calculate the treatment mcans for cach factor and the grand man. (Careful with 132 133 128 119 129 126 124 133 135 121 125 125 129 your notation! Be sure you know the difference between T2. and T.2.) (b) Calculate SST, SSA, SSB, and SSE. Identify the appropriatember of degrecs of freedom for cach c) Calculate the fitted valucs T23 and TA2 d) Calculate the residual values ê and es4 (c) What are the best estimates for 3 and ? Explain in the context of the prblm what these are attempting to mcasurc.Explanation / Answer
> treatment=c(135,132,129,121,136,133,126,125,130,128,124,125,125,119,133,129)
> factorA=c(rep("A1",4),rep("A2",4),rep("A3",4),rep("A4",4))
> factorB=rep(c("B1","B2","B3","B4"),4)
> df=data.frame(treatment,factorA,factorB)
> df
treatment factorA factorB
1 135 A1 B1
2 132 A1 B2
3 129 A1 B3
4 121 A1 B4
5 136 A2 B1
6 133 A2 B2
7 126 A2 B3
8 125 A2 B4
9 130 A3 B1
10 128 A3 B2
11 124 A3 B3
12 125 A3 B4
13 125 A4 B1
14 119 A4 B2
15 133 A4 B3
16 129 A4 B4
> attach(df)
The following objects are masked _by_ .GlobalEnv:
factorA, factorB, treatment
a) > aggregate(treatment,by=list(factorA),mean)
Group.1 x
1 A1 129.25
2 A2 130.00
3 A3 126.75
4 A4 126.50
> aggregate(treatment,by=list(factorB),mean)
Group.1 x
1 B1 131.5
2 B2 128.0
3 B3 128.0
4 B4 125.0
> mean(treatment)
[1] 128.125 : GRAND MEAN
b)> model=aov(treatment~factorA+factorB)
> summary(model)
Df Sum Sq Mean Sq F value Pr(>F)
factorA 3 37.25 12.42 0.466 0.713
factorB 3 84.75 28.25 1.060 0.413
Residuals 9 239.75 26.64
SSA = 37.25 , df=3
SSB=84.75,df=3
SSE=239.75,df=9
SST= 361.75,df=15
c)
> model1=lm(treatment~factorA+factorB)
> model1
Call:
lm(formula = treatment ~ factorA + factorB)
Coefficients:
(Intercept) factorAA2 factorAA3 factorAA4 factorBB2 factorBB3
132.62 0.75 -2.50 -2.75 -3.50 -3.50
factorBB4
-6.50
x 2,3 = 132.62 + 0.75 -3.5 =129.87
x4,2 = 132.62 -2.75 -3.5 = 126.37
d) x11= 132.62
e11 = 135 - 132.62 = 2.38
x3,4 = 132.62-2.5-6.5 =123.62
e3,4 = 125 -123.62 = 1.38
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.