ddim: Data Dimension Statistics

Description Usage Arguments Value See Also Examples

View source: R/ddim.R

Description

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

Usage

1
2
3
4
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 (ncs), and m, the sum of the responses per stratum (mcs).

See Also

Ts.estim

Examples

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

TwoStepCLogit documentation built on May 2, 2019, 6:36 a.m.