Description Usage Arguments Details Value Examples

View source: R/two.level.components.R

Takes a large sample from the background population and calculates the within
and between covariance matrices, a vector of means, a vector of the counts of
replicates for each item from the sample, and other bits needed to make up a
`compcovar`

object.

1 | ```
two.level.components(data, data.columns, item.column)
``` |

`data` |
a |

`data.columns` |
a |

`item.column` |
an integer indicating which column gives the item |

Uses ML estimation at the moment - this will almost certainly change in the future and hopefully allow regularisation methods to get a more stable (and non-singular) estimate.

an object of class `compvar`

1 2 3 4 5 6 7 | ```
# load Greg Zadora's glass data
data(glass)
# calculate a compcovar object based upon glas
# using K, Ca and Fe - warning - could take time
# on slower machines
Z = two.level.components(glass, c(7,8,9), 1)
``` |

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.