seperateFormula: Separate the covariates in a formula

Description Usage Arguments Details Value Note

View source: R/functions4glmClust.R

Description

Separate the covariates from a 'formula' with a cluster effect from the ones with an identical effect in each cluster if provided.

Usage

1

Arguments

formula

A symbolic description of the model. In the parametric case we write for example y ~ clust(time+time2) + pop(sex), here 'time' and 'time2' will have a different effect according to the cluster, the 'sex' effect is the same for all the clusters. In the non-parametric case only one covariate is allowed.

Details

Given a 'formula' of the form Y ~ clust(T1 + T2 + ...) + pop(X1 + X2 + ...) or just Y ~ clust(T1 + T2 + ...), it returns a list of two or one 'formula' of the form Y ~ T1 + T2 + ... and ~ X1 + X2 + ... if provided.
The first element of the list correspond to the covariates with a different effects corresponding to the cluster, the 2nd correspond to covariates having an identical effect in each cluster.
In the non-parametric case only one covariate is allowed.

Value

A list of 1 or 2 [formula].

Note

Meant to be used internally.



kmlcov documentation built on May 20, 2017, 12:53 a.m.
Search within the kmlcov package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.