Description Usage Arguments Value Author(s) See Also Examples
CGstats
provides what corresponds to calling
cow.wt
on different strata of data where the strata are defined by
the combinations of factors in data.
1 |
object |
A dataframe. |
varnames |
Names of variables to be used. |
homogeneous |
Logical; if TRUE a common covariance matrix is reported. |
simplify |
Logical; if TRUE the result will be presented in a simpler form. |
A list whose form depends on the type of input data and the varnames.
Søren Højsgaard, sorenh@math.aau.dk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(milkcomp)
# milkcomp <- subset(milkcomp, (treat %in% c("a","b")) & (lactime %in% c("t1", "t2")))
# milkcomp <- milkcomp[,-1]
# milkcomp$treat <- factor(milkcomp$treat)
# milkcomp$lactime <- factor(milkcomp$lactime)
CGstats(milkcomp)
CGstats(milkcomp, c(1,2))
CGstats(milkcomp, c("lactime","treat"))
CGstats(milkcomp, c(3,4))
CGstats(milkcomp, c("fat","protein"))
CGstats(milkcomp, c(2,3,4), simplify=FALSE)
CGstats(milkcomp, c(2,3,4), homogeneous=FALSE)
CGstats(milkcomp, c(2,3,4), simplify=FALSE, homogeneous=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.