联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Algorithm 算法作业Algorithm 算法作业

日期:2018-04-25 02:25


The model equation is

Xij = µ + αi + βj + ϵij


Let’s consider the following example:

Factor A = amount of a medication

Factor B = the age of a patient

The object of this experiment is to compare one factor ANOVA with two factor (blocked) ANOVA.  

If we use one factor ANOVA here, it might be difficult to catch the treatment effect.  (i.e. it might be hard to distinguish what is actually an


effect from the medication from effects of a person’s age).

In this case, βj gets shoved into ϵij, increasing the error and increasing the variance of ϵij.

If we use blocked ANOVA instead, however, there will be a large cost to degrees fo freedom for the SSE.


For our experiment, we need to choose αi and βj (i= 1,…, i, and j = 1,..., j) for two different cases:

1) A case where blocking works and increases power (as compared to one-factor ANOVA)

2) A case where blocking doesn’t work and power is decreased.

In each case, µij = µ + αi + βj should be the same.

We can set µ = 0, but we must remember that ∑_(i=0)^I▒αi = ∑_(j=0)^j▒βj = 0.


Power is the P(rejecting H0 correctly| Ha is correct); i.e., correctly rejecting H0.

To calculate it, we’ll need to calculate (# of rejections of H0 / # of times we repeat the experiment).

So, to calculate power properly, we’ll need to repeat the experiment many times.

For the experiment, we’ll need to create an IxJ data frame of iid N(0, σ2) errors, then create a matrix where the entries are µ + αi + βj.  


Adding the original data frame to this matrix will give us our simulated observations Xij.

We will then apply ANOVA both for the one factor and two factor blocking case.  We will need to determine whether H0 is rejected for all cases, and


then count the rejections.  We’ll need to simulate the experiment a bunch of times and find the power (using the # of rejections) of each


experiment.

We will be fiddling with σ, αi, and βj until we get a configuration so that the highlighted conditions hold (so two separate experiments).

We will also need to do this for multiple values of i, so it will be useful to develop an intuition about the parameters so that we can determine


whether to use one factor or blocked ANOVA.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp