ddim {TwoStepCLogit}R Documentation

Data Dimension Statistics

Description

Function that computes dimension statistics for a data set with clusters and strata and its print method.

Usage

ddim(formula, data)

## S3 method for class 'ddim'
print(x, ...)

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.

...

Further arguments to be passed to print.default.

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).

See Also

Ts.estim

Examples

dimstat <- ddim(formula = Y ~ strata(Strata) + cluster(Cluster), data = bison)
dimstat

[Package TwoStepCLogit version 1.2.5 Index]