groupedData object from a data matrix. This function
can be used only with balanced data. The opposite conversion, from a
groupedData object to a
matrix, is done with
A formula of the form
A matrix or data frame containing the values of the
response grouped according to the levels of the grouping factor
(rows) and the distinct levels of the primary covariate (columns).
an optional list of character strings giving labels for
the response and the primary covariate. The label for the primary
covariate is named
an optional list of character strings giving the units for
the response and the primary covariate. The units string for the
primary covariate is named
Jos<c3><a9> Pinheiro and Douglas Bates [email protected]
Pinheiro, J. C. and Bates, D. M. (2000), Mixed-Effects Models in S and S-PLUS, Springer, New York.
1 2 3 4 5 6 7 8 9 10 11
OrthoMat <- asTable( Orthodont ) Orth2 <- balancedGrouped(distance ~ age | Subject, data = OrthoMat, labels = list(x = "Age", y = "Distance from pituitary to pterygomaxillary fissure"), units = list(x = "(yr)", y = "(mm)")) Orth2[ 1:10, ] ## check the first few entries # Pinheiro and Bates, p. 109 ergoStool.mat <- asTable(ergoStool) balancedGrouped(effort~Type|Subject, data=ergoStool.mat)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.