PolrME: Mixed-effects version of 'Polr'

View source: R/models.R

PolrMER Documentation

Mixed-effects version of Polr

Description

Mixed-effects version of Polr

Usage

PolrME(
  formula,
  data,
  subset,
  weights,
  offset,
  na.action = na.omit,
  method = c("logistic", "probit", "loglog", "cloglog"),
  silent = TRUE,
  resid = FALSE,
  do_update = FALSE,
  estinit = TRUE,
  initpar = NULL,
  fixed = NULL,
  nofit = FALSE,
  control = optim_control(),
  ...
)

Arguments

formula

an object of class "formula": a symbolic description of the model structure to be fitted. The details of model specification are given under tram and in the package vignette.

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).

subset

an optional vector specifying a subset of observations to be used in the fitting process.

weights

an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector. If present, the weighted log-likelihood is maximised.

offset

this can be used to specify an _a priori_ known component to be included in the linear predictor during fitting. This should be NULL or a numeric vector of length equal to the number of cases.

na.action

a function which indicates what should happen when the data contain NAs. The default is set to na.omit.

method

a character describing the link function.

silent

Logical. Make TMB functionality silent.

resid

Logical. If TRUE, the score residuals are also calculated. This comes with some performance cost.

do_update

Logical. If TRUE, the model is set up so that the weights and the offsets are updateable. This comes with some performance cost.

estinit

logical, estimate a vector of initial values for the fixed effects parameters from a (fixed effects only) mlt model

initpar

named list of initial parameter values, if NULL, it is ignored

fixed

a named vector of fixed regression coefficients; the names need to correspond to column names of the design matrix

nofit

logical, if TRUE, creates the model object, but does not run the optimization

control

list with controls for optimization

...

additional arguments to tram.

Value

A PolrME object.


tramME documentation built on July 9, 2023, 7:10 p.m.