DOC PREVIEW
UW-Madison STAT 572 - Lecture 22 Notes

This preview shows page 1-2-3-20-21-22-41-42-43 out of 43 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 43 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

The traditional approachThe Mean Squares approach for the Completely randomized design (CRD)CRD and one-way ANOVAVariance components and the F testInference about the interceptSample vs. subsample size determinationThe Mean Squares approach for CRD with subsamplingExample and ModelANOVA tableF testsPairwise treatment comparisons with LSDSample and subsample size determinationOutline1The traditional approach2The Mean Squares approach for the Completelyrandomized design (CRD)CRD and one-way ANOVAVariance components and the F testInference about the interceptSample vs. subsample size determination3The Mean Squares approach for CRD with subsamplingExample and ModelANOVA tableF testsPairwise treatment comparisons with LSDSample and subsample size determinationTraditional methods for experimental studiesAn experimental design is chosen from a finite set(catalog) of experimental designs.Designs are balanced, at least in some way.Designs are named.Each design is associated to a particular model.The traditional analysis of these models uses F-tests, as inANOVA.Because: there are formulas for these F-tests on nicelybalanced data sets. (Remember?)At the time, formulas were necessary for the calculations to becomputationally tractable.Traditional methodsYou already know:Many of these designs (we just need to name them!)All their associated models (just need to recognize them!)The model for a particular ‘traditional’ design is either alinear model or a random-effect or a mixed-effect model,with a particular set of predictors and a particular set ofinteractions between them.The models we have already covered are not restricted tocatalog.What we will cover:the names of designs in the catalog, and the predictors inassociated modelsThe F-tests associated with these nicely balanced designsTraditional methodsBenefits:Communication –names do helpOrganizing one’s thoughts –a catalog may helpThe F-test and the likelihood ratio test are often similarlypowerful, but the F-test can be more powerfulOverall comparison of the F-test and LRTF-test restricted in use, LRT always available (ex: logistic)On fixed-effect models: the F-test is exact, the χ2k-basedLRT is approximate.On mixed-effect models: both tests are approximate.The F-test assumes that all variance components areknown for sure,The χ2k-based LRT might be so conservative or soanti-conservative that we need a parametric-bootstrapbased p-value.With unbalanced data, it is unclear what F-distribution theF-value should be compared with. Use approximatedenominator df.The F-test can be more powerful.Outline1The traditional approach2The Mean Squares approach for the Completelyrandomized design (CRD)CRD and one-way ANOVAVariance components and the F testInference about the interceptSample vs. subsample size determination3The Mean Squares approach for CRD with subsamplingExample and ModelANOVA tableF testsPairwise treatment comparisons with LSDSample and subsample size determinationCompletely Randomized Design and one-way ANOVAYi= µ + αj[i]+ eiwith ei∼ N (0, σ2e) independentBalanced design: each of the k treatments is sampled ntimes: nj= n.Example: loblolly pine needles and stomata density.k = 10 needles, n = 4 rows from each needle.Example: corn yield, k = 8 sites, n = 8 plots from eachsite.Fixed effects: we will constrain the k deviations from theoverall mean, αj, to sum up to 0.In R, we will use the “sum” contrast. The default“treatment” contrast uses one reference level andconstrains its αref ito be 0.Random effects: assume αj∼ N (0, σ2α) and independent.Analysis in R, default “treatment” contrast option> corn = read.table("corn.txt", header=T)> getOption("contrasts")unordered ordered"contr.treatment" "contr.poly"> lm(ears ˜ site, data=corn)(Intercept) siteLFAN siteNSAN siteORAN siteOVAN44.38 -1.13 -17.88 -1.13 -4.88siteTEAN siteWEAN siteWLAN-6.63 0.25 6.12> with(corn, mean(ears[site=="DBAN"]))[1] 44.38> 44.38 + 6.12 # last site, WLAN[1] 50.5> with(corn, mean(ears[site=="WLAN"]))[1] 50.5Analysis in R, using the “sum” contrast option> oldoptions = options(contrasts=c("contr.sum","contr.poly"))> getOption("contrasts")[1] "contr.sum" "contr.poly"> oldoptions$contrasts # saved, in case we want to go backunordered ordered"contr.treatment" "contr.poly"> fit.lm = lm(ears ˜ site, data=corn) # re-fit same model> coef(fit.lm)(Intercept) site1 site2 site3 site441.22 3.16 2.03 -14.72 2.03site5 site6 site7-1.72 -3.47 3.41> with(corn, mean(ears)) # overall mean[1] 41.22how much does the last site deviate from the overall mean? = alpha_8> -sum( coef(fit.lm)[2:8])[1] 9.28> 41.22 + 9.28[1] 50.5 # indeed, this is the mean of last site, WLANThe F testYi= µ + αj[i]+ eiwith ei∼ N (0, σ2e) independentFixed Effects Random EffectsModelPki= jαi= 0 αj∼ iid N (0, σ2α)F-Test H0: αj= 0 for all j H0: σ2α= 0ANOVA table, with an extra column: expected Mean Squares.Source df SS MS IE(MS) fixed randomTrt k − 1 SSTrt MSTrt σ2e+nPki=1α2ik−1σ2e+ nσ2αError k(n − 1) SSErr MSErr σ2eσ2eTotal kn − 1 SSTotF test: uses the fact that F =MSTrtMSErr∼ Fk−1,k(n−1)if H0is true(no needle effect), in both models.Variance component estimation with Mean SquaresRandom effect model:Source df SS MS IE(MS)Trt k − 1 SSTrt MSTrt σ2e+ nσ2αError k(n − 1) SSErr MSErr σ2eTotal kn − 1 SSTotWe can use E(MS) to estimate:ˆσ2e= MSErr and ˆσ2α=MSTrt − MSErrnThese estimates may differ from the ML or REMLestimates.This ˆσ2αcalculation may give a negative value...In this case, take ˆσ2α= 0.Variance component estimation with Mean SquaresWith a balanced design, the REML estimates of σ2eand σ2αandthe MS-based estimates are equal.> fit.lm = lm(ears ˜ site, data=corn)> anova(fit.lm)Df Sum Sq Mean Sq F value Pr(>F)site 7 2780.7 397.24 18.230 2.205e-12***Residuals 56 1220.2 21.79> ( 397.24 - 21.79 ) / 8 # n=8 plots per site[1] 46.93125 # that is sˆ2_site, Mean Square estimation# compare with REML:> fit.lmer = lmer(ears ˜ (1|site), data=corn)> fit.lmer...Random effects:Groups Name Variance Std.Dev.site (Intercept) 46.931 6.8506Residual 21.790 4.6680Number of obs: 64, groups: site, 8Inference about µ with Mean SquaresAssuming we have a balanced design nj= n, the interceptestimate is the grand mean:ˆµ =¯y..=Piyink= µ +Pjαjk+Pieinkso its variance isvar(ˆµ) =σ2αk+σ2enk=nσ2α+ σ2enkSince IE(MSTrt) = nσ2α+ σ2e, we estimate var(ˆµ) byMSTrtnkandSE of ˆµ =rMSTrtnkon dfMSTrt= k − 1.Confidence intervals obtained


View Full Document

UW-Madison STAT 572 - Lecture 22 Notes

Download Lecture 22 Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 22 Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 22 Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?