isBalanced package:nlme R Documentation _C_h_e_c_k _a _D_e_s_i_g_n _f_o_r _B_a_l_a_n_c_e _D_e_s_c_r_i_p_t_i_o_n: Check the design of the experiment or study for balance. _U_s_a_g_e: isBalanced(object, countOnly, level) _A_r_g_u_m_e_n_t_s: object: A 'groupedData' object containing a data frame and a formula that describes the roles of variables in the data frame. The object will have one or more nested grouping factors and a primary covariate. countOnly: A logical value indicating if the check for balance should only consider the number of observations at each level of the grouping factor(s). Defaults to 'FALSE'. level: an optional integer vector specifying the desired prediction levels. Levels increase from outermost to innermost grouping, with level 0 representing the population (fixed effects) predictions. Defaults to the innermost level. _D_e_t_a_i_l_s: A design is balanced with respect to the grouping factor(s) if there are the same number of observations at each distinct value of the grouping factor or each combination of distinct levels of the nested grouping factors. If 'countOnly' is 'FALSE' the design is also checked for balance with respect to the primary covariate, which is often the time of the observation. A design is balanced with respect to the grouping factor and the covariate if the number of observations at each distinct level (or combination of levels for nested factors) is constant and the times at which the observations are taken (in general, the values of the primary covariates) also are constant. _V_a_l_u_e: 'TRUE' or 'FALSE' according to whether the data are balanced or not _A_u_t_h_o_r(_s): Jose Pinheiro Jose.Pinheiro@pharma.novartis.com and Douglas Bates bates@stat.wisc.edu _S_e_e _A_l_s_o: 'table', 'groupedData' _E_x_a_m_p_l_e_s: isBalanced(Orthodont) # should return TRUE isBalanced(Orthodont, countOnly = TRUE) # should return TRUE isBalanced(Pixel) # should return FALSE isBalanced(Pixel, level = 1) # should return FALSE