Learn R Programming

tramME (version 0.1.3)

tramME_model: Create an object that defines a tramME_model

Description

There are two ways of defining tramME models:

  1. A ctm model and a formula defining the random effects.

  2. A formula combining the notation of tram and lme4, a tram function name, and a dataset to set up the bases.

Usage

tramME_model(
  formula = NULL,
  data = NULL,
  tram = NULL,
  ctm = NULL,
  negative = NULL,
  ...
)

Arguments

formula

formula that either describes the whole model or the random effects specification. If the model contains random effects, formula has to contain their definition in lme4-style notation.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula).

tram

tram model name: Lm, BoxCox, Colr, Polr, Coxph, Survreg, Lehmann, Aareg, or the suffixed versions of these (e.g. ColrME). Ignored when a ctm model is also supplied.

ctm

A ctm model

negative

an optional parameter that defines whether the random effects have a positive or a negative sign in the model when the fixed effecst part is defined through a ctm

...

optional arguments passed to tram when the model is defined by the formula

Value

A tramME_model object that defines the mixed effects transfromation model.