STA6167_Project_2_Ramin_Shamshiri_Solution

download STA6167_Project_2_Ramin_Shamshiri_Solution

of 10

Transcript of STA6167_Project_2_Ramin_Shamshiri_Solution

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    1/10

    1

    STA 6167, Section 1648, Fall 2007

    Project #2

    Due Thursday 2/07/08

    RAMI SHAMSHIRIUFID#: 9021-3353

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    2/10

    2

    Part1

    Response: Clearance of theophyline

    Factor A: popular heartburn medication: Placebo/Tagment/Pepcid

    Factor B: Drug: Theophylline

    Subjects: 14 patients suffering from chronic obstructive pulmonary disorder

    Goal: To compare the true population mean theophylline clearances in the treatment groups

    Treatment groups:

    1. Theophylline/Placebo (i=1)

    2. Theophylline/Tagamet (i=2)

    3. Theophylline/Pepcid (i=3)

    Answer:

    Here we have t=3 treatments (groups) to be compared. We also have b=14 blocks (subjects). The

    outcome (Response) is Clearance of theophyline and is labeled Yij which means when treatment i is

    assigned to block j.

    ai: Effect of treatment i

    bj : Effect of treatment j

    ij: Random error

    This problem can be modeled as below:

    (Block effects and random errors independent):

    Questions:

    1- Give the sample means for each treatment:

    Answer:

    From SASN

    intagnt Obs Mean

    1 14 3.0792857

    2 14 3.1592857

    3 14 2.2557143

    From Excel:

    Treatment groups Treatment Mean

    Theophylline/Placebo (i=1) 3.079285714

    Theophylline/Tagamet (i=2) 3.159285714

    Theophylline/Pepcid (i=3) 2.255714286

    ( ) ( )22

    1,0~,0~0 eijbj

    t

    ii

    ijjiijjiij

    Y

    =

    ++=+++=

    =

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    3/10

    3

    2- Give the sample means for each subject:

    Answer:

    From Excel:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14

    5.88 5.89 1.46 4.05 1.09 2.59 1.69 3.16 2.06 4.59 2.08 2.61 3.42 2.54

    5.13 7.04 1.46 4.44 1.15 2.11 2.12 3.25 2.11 5.2 1.98 2.38 3.53 2.33

    3.69 3.61 1.15 4.02 1 1.75 1.45 2.59 1.57 2.34 1.31 2.43 2.33 2.34

    4.9 5.513 1.357 4.17 1.08 2.15 1.753 3 1.913 4.043 1.79 2.473 3.093 2.403

    Sample means for each subject from SAS output:

    subject Obs Mean

    1 3 4.9000000

    2 3 5.5133333

    3 3 1.3566667

    4 3 4.1700000

    5 3 1.0800000

    6 3 2.1500000

    7 3 1.7533333

    8 3 3.0000000

    9 3 1.9133333

    10 3 4.0433333

    11 3 1.7900000

    12 3 2.4733333

    13 3 3.0933333

    14 3 2.4033333

    3- Obtain the Analysis of Variance Table

    Answer:

    Source SS df MS F

    Treatments SST t-1 MST= SST/(t-1) F= MST/MSE

    Blocks SSB b-1 MSB = SSB/(b-1)

    Error SSE (b-1)(t-1) MSE= SSE/[(b-1)(t-1)]

    Total TSS bt-1

    Where:

    ( )

    ( )

    ( )

    ( ) )1)(1(59.881.7101.741.87

    13181.71

    2101.7

    41141.87

    2

    ....

    1

    2

    ...

    1

    2

    ...

    1 1

    2

    ..

    =====+=

    ====

    ====

    ====

    =

    =

    = =

    tbdfSSBSSTTSSyyyySSE

    bdfyytSSB

    tdfyybSST

    btdfyyTSS

    Ejiij

    B

    b

    j j

    T

    t

    i i

    t

    i

    b

    j Totalij

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    4/10

    4

    Source SS df MS F

    Treatments SST=7.01 2 MST= 3.505 F= 10.59

    Blocks SSB=71.81 13 MSB = 5.52

    Error SSE=8.59 26 MSE= 0.33

    Total TSS=87.41 41

    From SAS output, we can see the same results.

    Sum of

    Source DF Squares Mean Square F Value Pr > F

    Model 15 78.81656667 5.25443778 15.89 F

    intagnt 2 7.00518571 3.50259286 10.59 0.0004

    subject 13 71.81138095 5.52395238 16.70 P-value: 0.0004 Reject H0

    F-critical=F0.05,2,26 = (From F-tables)=3.37

    F-obs= 10.59 is larger than F-critical=F0.05,2,26=3.37, or it s equivalent to say that The P-value from the

    Test statistic is smaller than 0.05 significant level, thus we reject the null hypothesis and

    conclude that Not all the 3 treatment means are equal.

    5- Use Tukeys method to compare all pairs of treatment means with an experimentwise error

    rate of E=0.05.

    Answe:

    Since we have rejected the H0 and concluded differences exist among the treatment means, we

    can now use Tukeys method to determine which treatments differ significantly.

    t= number of treatments

    n= total number of observations=bt

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    5/10

    5

    ni= The number of measurements per treatment

    ,, .,,0.33

    3.5140.33 0.54

    Comparison Confidence Interval ConclusionPlacebo VS Tagamet 3.07-3.15= -0.08 (-0.62,0.46) NSD

    Placebo VS Pepcid 3.07-2.55=0.52 (-0.02,1.06) Pl>Pe

    Tagamet VS Pepcid 3.15-2.557=0.593 (0.05,1.133) T>P

    Alpha 0.05

    Error Degrees of Freedom 26

    Error Mean Square 0.330721

    Critical Value of Studentized Range 3.51417

    Minimum Significant Difference 0.5401

    Means with the same letter are not significantly different.

    Tukey Grouping Mean N intagnt

    A 3.1593 14 2

    A

    A 3.0793 14 1

    B 2.2557 14 3

    6- Give the relative efficiency of the RBD to CRD for this experiment. How many subjects would

    be needed per treatment for CRD to give treatment means estimates with the precision of this

    RBD?

    Answer:

    The relative efficiency of using this design as opposed to a Completely RandomizedDesign is obtained as:

    98.553.13

    81

    )33.0)(1)3(14(

    )33.0)(2(14)52.5(13

    )1(

    )1()1(),(

    33.0525.5143

    ==

    +=

    +=

    ====

    MSEbt

    MSEtbMSBbCRDRCBRE

    SESBbt

    We will need 5.98 times as many subject per treatment for CRD to give Treatment means estimate with

    the precision of this RBD.

    14(5.98) 84 subject per treatment

    3(84) = 252 total subjects

    7- Qualitatively, what is the studys implications?

    Answer:Here we compared the mean theophylline clearances when it is taken with each of the three drugs,

    Placebo, Tagment, Pepcid. Here Randomized Block Design was used and we controlled for the subject-to-subject

    variation when comparing the three treatments. We tested for treatment effects, and when we realized that not

    all of the treatments have equal effects, we used the Tukeys method to make pairwise comparisons among the

    three drugs. This result showed that Placebo and tagamet has a greater effect than Pepcid.

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    6/10

    6

    Part 2-

    Here we have more than one set of treatments that wed like to compare simultaneously. If we wish to

    measure the interaction we will have to have more than one measurement (replicate) corresponding to

    each combination of levels of the 2 factors.

    Response: 85 day weight gains in the rats

    Factor A: Model (a=2 Levels)

    Male (i=1)

    Female (i=2)

    Factor B: dosing regimens (b=6 Levels)

    Control (0 mg/kg/day)

    Subcutaneous Injection (1.0 mg/kg/day)

    Oral Glavage (0.1 mg/kg/day)

    Oral Glavage (0.5 mg/kg/day)

    Oral Glavage (5 mg/kg/day)

    Oral Glavage (50 mg/kg/day)

    Replicates: n=5 per Treatment =>5*(2*6)=60 rats

    Model:

    ( )

    ( )

    ( ) ( ) ( )2,0~0error termRandom

    regimensdosingandgenderbetweeneffectnInteractio

    levelregimensdosingofEffect

    genderofEffect

    MeanOverall

    ratsin thegainsday weight85

    :where

    5,..,16,5,4,3,2,12,1

    ji

    j

    i

    Y

    kjiY

    ijk

    j

    ij

    i

    ij

    j

    j

    i

    i

    ijk

    ij

    j

    i

    ijk

    ijkijjiijk

    ====

    ===++++=

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    7/10

    7

    Questions:

    1- Give the sample means for the 12 treatments (2 Gender x 6 Dosing Regimens)

    Answer:

    N

    gender trt Obs Mean

    1 1 5 324.0020000

    2 5 432.0020000

    3 5 326.9980000

    4 5 318.0000000

    5 5 324.9980000

    6 5 328.0000000

    2 1 5 148.0020000

    2 5 217.0000000

    3 5 140.0000000

    4 5 152.0000000

    5 5 147.0000000

    6 5 152.0000000

    Analysis Variable : wtgain

    N

    gender Obs Mean

    1 30 342.3333333

    2 30 159.3336667

    Analysis Variable : wtgain

    N

    trt Obs Mean

    1 10 236.0020000

    2 10 324.5010000

    3 10 233.4990000

    4 10 235.0000000

    5 10 235.9990000

    6 10 240.0000000

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    8/10

    8

    2- Test whether there is an interaction between Gender and Dosing Regimen. (=0.05)

    Answer:

    Source df SS MS F P-Value

    Gender 1 502333.170 502333.170 346.6 0.0001

    Dosing regimens 5 65354.856 13070.971 9.02 0.0001Interaction 5 3630.3300 726.0660 0.50 0.7740

    Error 48 69564.394 1449.2582

    Total 59 640882.7514

    To test the interaction of factors A and B is as below:

    H0: ()11=...=( )ab=0 No interaction effect

    HA: Not all ()ij=0 Interaction effect exist

    = = 0.5The P-value from this test is much greater than any acceptable significance level, thus we DONOT reject the null hypothesis and conclude that No interaction effect exist between factor A

    and Factor B.

    3- If there is not an interaction:

    a) Test whether there are gender or dosing regimen main effects. (Each at =0.05).

    Answer:

    Now that we realized no interaction effects exist, we can test for differences among the effects of the

    levels of factor A and for differences among the effect of the level of factor B as follows.

    Test for Factor A effect:

    H0: 1=...=a=0 No Factor A effect

    HA: Not all i=0 Factor A effect exist

    = = 346.6 with P-value= 0.0001The P-value from this test is smaller than any acceptable significance level, thus we REJECT the

    null hypothesis and conclude that Factor A (gender) effect exist.

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    9/10

    9

    Test for Factor B effect:

    H0: 1=...=b=0 No Factor A effect

    HA: Not all j=0 Factor A effect exist

    = = 9.02 with P-value= 0.0001The P-value from this test is smaller than any acceptable significance level, thus we REJECT the

    null hypothesis and conclude that Factor B (dosing regimens) effect exist.

    b) Use Tukeys method to compare genders (E=0.05), and all pairs of dosing regimens (E=0.05).

    Answer:Post-Hoc Comparisons: Now that we realized there is no interaction, we can make pairwisecomparisons among levels of Factor A and Factor B, respectively.

    For Factor A, we use Tukeys method, and obtain simultaneous confidence intervals of the form:

    .. .. ,, .,, = 2.843 (From Table).,,1449.25 = 2.843 6.95 = 19.75885 => 75.19W

    Gender (2 levels => 1 comparison)Male vs Female rats:.. .. = 342.3 152.3 = 190 95%CI: 190 19.75=(170.25,209.75)For Factor B, the Tukeys method, is in the form:

    .. .. ,, .,, = 4.197 (From Table).,,1449.25 = 4.197 12.03 = 50.52=> 5.50W

    Dosing regiments (6 levels =>C(6,2)=15 comparison)

    Comparisons .. .. Confidence Interval Conclusion1 0mg vs 1 mg 236-324=-88 -8850.5 (1mg)> (0mg)

    2 0mg vs 0.1 mg 236-233=3 350.5 NSD

    3 0mg vs 0.5 mg 236-235=1 150.5 NSD

    4 0mg vs 5 mg 236-235.9=0.09 0.0950.5 NSD

    5 0mg vs 50 mg 236-240=-4 -450.5 NSD

    6 1mg vs 0.1 mg 324-233=91 9150.5 (1mg)> (0.1mg)

    7 1mg vs 0.5 mg 324-235=89 8950.5 (1mg)> (0.5mg)

    8 1mg vs 5 mg 324-235.9=88.1 88.150.5 (1mg)> (5mg)

    9 1mg vs 50 mg 324-240=84 8450.5 (1mg)> (50mg)10 0.1mg vs 0.5 mg 233-235=-2 -250.5 NSD

    11 0.1mg vs 5 mg 233-235.9=-2.9 -2.950.5 NSD

    12 0.1mg vs 50 mg 233-240=-7 -750.5 NSD

    13 0.5mg vs 5 mg 235-235.9=-0.9 -0.950.5 NSD

    14 0.5mg vs 5 mg 235-240=-5 -550.5 NSD

    15 5mg vs 50 mg 235.9-240=-4.1 -4.150.5 NSD

  • 7/30/2019 STA6167_Project_2_Ramin_Shamshiri_Solution

    10/10

    10

    From SAS output:

    Alpha 0.05

    Error Degrees of Freedom 48

    Error Mean Square 1449.258

    Critical Value of Studentized Range 2.84352

    Minimum Significant Difference 19.764

    Means with the same letter are not significantly different.

    Tukey Grouping Mean N gender

    A 342.333 30 1

    B 159.334 30 2

    Alpha 0.05

    Error Degrees of Freedom 48

    Error Mean Square 1449.258

    Critical Value of Studentized Range 4.19724

    Minimum Significant Difference 50.529

    Means with the same letter are not significantly different.

    Tukey Grouping Mean N trt

    A 324.50 10 2

    B 240.00 10 6

    B

    B 236.00 10 1

    B

    B 236.00 10 5B

    B 235.00 10 4

    B

    B 233.50 10 3

    5) Qualitatively, what is the studys implications?

    Answer:Here we compared more than one set of treatment simultaneously using 2-way

    ANOVA. Testing for interaction effect between the two factors, gender and dose regimensshows that NO interaction effect between the two factors exists, however testing for individualeffects of factors revealed that gender and dose regimens have significant effects on the rats.For the first factor, gender, this effect was obviously observed between the only possiblecomparison, male and female groups. For the second factor, this effect was observed when thedose regimen was 1mg.