Lecture 7

Slides

Jupyter Notebook

Lab3


HW7 (Due Oct 22)

Compare the statistical power between One-way ANOVA F-test and Permutation Test on range statistics under the following scenario: 

Number of Groups: 4

Number of Observations per group: 10

Data in each group are generated from the following normal distributions

N(0,1) N(-1,1) N(1,1) N(0,1). 

Note that this numerical experiment might take a bit long to finish, as we will perform permutation tests 1000 times. Below is a template of code to help you get started.



pval.F <- rep(0,1000)

pval.R <- rep(0,1000)


for(i in 1:1000){

    ### Simulate Data

    x <- rep(c("A","B","C","D"),rep(10,4))

    y <- 

    

    ### fstatistics and degree of freedoms

    fstat <- summary(lm(y~x))$fstat

    

    ### get P-val from the f-distribution

    pval.F[i] <- 1- pf(fstat[1],fstat[2],fstat[3])

    

    ### do the permutation test below on the same data

    

   

Plan for Oct 20th

We will discuss mixed effect model

We will use some data from a published study.


It would be very helpful if you read part of the paper (linked above) before the lecture, the paragraph subtitled "experimental design" in "Material and methods" and Figure 1, and think about the following questions.

1. how many factors are in the study? 

2. how is this study different from the two examples (one in lecture 6, one in HW6) that we used two-way ANOVA for.






    

    

    

    

    

    

    

}



Comments

Popular posts from this blog

Syllabus

Lecture 3

Lecture 2 + Lab