Description Usage Arguments Value Author(s) Examples

View source: R/getVMat.twoPhase.R

Construct the matrix for each variance components for the single-phase or two-phase experiment.

1 | ```
getVMat.twoPhase(Z.Phase1, Z.Phase2, design.df, var.comp = NA)
``` |

`Z.Phase1` |
a list of block design matrix from |

`Z.Phase2` |
a list of block design matrix from |

`design.df` |
a data frame containing the experimental design. Requires
every column be a |

`var.comp` |
a vector of characters containing the variance components
of interest this allows the user to specify the variance components to be
shown on the ANOVA table. This also allows the user to specify artificial
stratum to facilitate decomposition. Default is |

A list of matrices.

Kevin Chang

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | ```
design2 <- local({
Run = as.factor(rep(1:4, each = 4))
Ani = as.factor(LETTERS[c(1,2,3,4,
5,6,7,8,
3,4,1,2,
7,8,5,6)])
Tag = as.factor(c(114,115,116,117)[rep(1:4, 4)])
Trt = as.factor(letters[c(1,2,1,2,
2,1,2,1,
1,2,1,2,
2,1,2,1)])
data.frame(Run, Ani, Tag, Trt)
})
blk.str1 = "Ani"
blk.str2 = "Run"
rT1 = terms(as.formula(paste("~", blk.str1, sep = "")), keep.order = TRUE)
#random terms phase 1
rT2 = terms(as.formula(paste("~", blk.str2, sep = "")), keep.order = TRUE)
#random terms phase 2
blkTerm1 = attr(rT1,"term.labels")
blkTerm2 = attr(rT2,"term.labels")
Z1 = makeBlkDesMat(design2, rev(blkTerm1))
Z2 = makeBlkDesMat(design2, rev(blkTerm2))
V = getVMat.twoPhase(Z1, Z2, design2, var.comp = NA)
``` |

infoDecompuTE documentation built on May 29, 2018, 9:05 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.