程序代写 Math 558 Lecture #4

Math 558 Lecture #4

Bread Rise Experiment1
In a bread rise experiment, the experimenter wants to examine three different rise times (35 minutes, 40 minutes, and 45 minutes) and tests four replicate loaves of bread at each rise time. The following can be used to create the CRD.

Copyright By PowCoder代写 加微信 powcoder

set.seed(300)
f <- factor( rep( c(35, 40, 45 ), each=4)) fr <- sample( f, 12 ) loaf <- 1:12 plan <- data.frame( Loafs=loaf, time=fr ) write.csv( plan, file = "Plan1.csv", row.names = FALSE) getwd() 1Lawson, pg 18 CRD generated in R loaf time height 1 45 10 40 11 35 12 45 Linear Model for CRD The linear model for a completely randomized design is given below Yiw = μi + εiw Here, the subscript i represents the ith treatment applied to the plot w where w = 1, 2, 3..ri(number of times treatment i is replicated. Also i ∈ τ = {1, 2, ..t}. The experimental errors εiw are mutually independent due to randomization and are assumed to follow the normal distribution. Statistical Analysis Statistical Analysis Statistical Analysis Statistical Analysis Linear Model for CRD The above model can be written as Yiw = μ+τi + εiw Here τi = μi − μ is the effect of the ith treatment. The responses are normally distributed. i. e Yiw ∼ N(μ + τ1, σ2). Equivalently εiw ∼ N(0, σ2). Let us consider the case of equal replication (r1 = r2 = ..ri = ..rt). The sample mean of the data for the ith treatment is 1 ri y ̄=r y i. ∑ iw i w=1 RCD: Statistical Analysis The overall mean is The least square estimators are obtained by minimizing the error sum of squares. SSE = ∑ ∑(yiw −μi)2 The resulting estimators are for i = 1,2,..t μˆ = y ̄ i i. 1t y ̄=t y ̄ .. ∑ i. i=1 Linear Model in the matrix form Let us consider a CRD with three treatments, each with four replications. Then the effects model in the matrix form can be written as Y = Xβ + ε y11  y 12 y13  y14  y 21 1100 ε11 1100 ε y22 1  = y23 1 y24  y31  y32  y33  0 τ1 ε22 × +  (1) ε31 ε32 ε33   12 1100 ε13 1100 ε14 1010 μ ε 1 1 1 1 0 τ2 ε23 0 τ3 ε24 y34 1001 ε34 Statistical Analysis The matrix β is the matrix of model parameters. The least squares estimators of the model parameters are obtained by solving the normal equations X′ Xβ = X′ y The matrix X′ X is singular therefore, cannot be inverted. The R command lm solves this problem by dropping the column that corresponds to the first treatment. The matrix that will be 1 0 0 1 0 0 1 0 0 1 0 0 1 1 0  1 1 0 used in the calculations is therefore, X1 =   1 1 0 1 1 0 1 0 1 1 0 1 1 0 1 Statistical Analysis Solving the above system of equations with X1 we have (X′ X)−1X′ y = βˆ  μˆ + τˆ  1 Where βˆ =  τˆ − τˆ  21 τˆ − τˆ 31 The first treatment is treated as a control and all other treatments are compared to it. Statistical Analysis Rise Time 35 Loaf Heights 4.4, 5.0,5.5,6.75 6.5, 6.5, 10.5,9.5 9.75,8.75,6.5,8.25 Table: Bread Rise Experiment Statistical Analysis Statistical Analysis 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com