Function that computes dimension statistics for a data set with clusters and strata
and its print method.
Usage
ddim(formula, data)
# S3 method for ddim
print(x, ...)
Value
Sc
The number of strata in each cluster.
Ystat
A data.frame with n, the numbers of observations per stratum
(\(n^c_s\)), and m, the sum of the responses per stratum
(\(m^c_s\)).
Arguments
formula
A formula object, with the response on the left of a ~ operator
and, on the right hand side, a strata and a cluster term
(ex. formula = Y ~ strata(var_strata) + cluster(var_cluster)).
The strata and cluster functions (from the package survival) are
used to identify the stratification and the cluster variables, respectively.
data
A data frame (or object coercible by as.data.frame to a data frame) containing the
variables in the model.
x
An object, produced by the ddim function, to print.