Learn R Programming

kmlcov (version 1.0.1)

addIndic: Create the new formula with the indicator covariates

Description

Write the new formula given the covariates with a level cluster effect, the number of clusters and the type parametric on time or not.

Usage

addIndic(covar, nClust, parametric = TRUE, nomClust = 'G')

Arguments

covar
A 'character' vector of covariates.
nClust
Number of clusters.
parametric
If [TRUE] it means we are parametric on time.
nomClust
The beginning of the name of the indicator covariates 'Ga, Gb, .., etc.

Value

A character string which will be used as a 'formula'.

Details

Given the covariates and the number of clusters, it returns a character string which will be converted inside glmClust to a formula to represent the covariates with different cluster effect.