Learn R Programming

tramME (version 1.0.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 and smooth terms.

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

Usage

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

Value

A tramME_model object that defines the mixed effects transfromation model.

Arguments

formula

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

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

smooth

Optional pre-defined smooth specification of the class tramME_smooth. If present, the smooth terms in the formula are ignored.

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