Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
> mask<-batch!="0652"
> length(mask)
[1] 511
> table(mask)
mask
FALSE  TRUE
   43   468
> X<-model.matrix(~factor(batch[mask]) + adj$plate_row[mask])
> Xbcrw<-solve(t(X) %*% X) %*% t(X) %*% t(redBred[,mask])
> redBR<- redBred[,mask] - t(X %*% Xbcrw)

Percent variance explained after removing the batch and the plate row effects:

The first principal component is smaller but not significantly so. Lets look again at the variables:

PCs

Batch

Center

Day

Month

Year

Amount

Concentr.

Row

Column

Stage

Grade

Age

1

0.7905

0.0001809

6.9e-01

8.4e-01

8.2e-01

6.4e-01

9.7e-02

9.9e-01

1.2e-05

 

 

0.41

0.53

0.6716

2

1

0.7522

1.00

1.00

0.96

0.93

0.75

0.96

0.46

 

 

0.36

0.30

0.02475

3

1

0.03907

1.00

1.00

0.93

0.97

0.52

1.00

0.17

 

 

0.30

0.27

0.1425