rStats.js v1.3.0
    Preparing search index...

    Interface GlmerOptions

    Options of glmer. Only the keys below are accepted: R's subset, naAction, na.action, control, verbose, devFunOnly, mustart and etastart give the Error glmer: argument '<key>' is not supported, any other key a RangeError (a key whose value is undefined included).

    interface GlmerOptions {
        contrasts?: Record<string, LmerContrastName>;
        family?: GlmerFamilyName;
        levels?: Record<string, readonly string[]>;
        link?: GlmLinkName;
        nAGQ?: number;
        offset?:
            | string
            | Float64Array<ArrayBufferLike>
            | readonly (number | null)[];
        start?: { fixef?: readonly number[]; theta?: readonly number[] };
        weights?:
            | string
            | Float64Array<ArrayBufferLike>
            | readonly (number | null)[];
    }
    Index
    contrasts?: Record<string, LmerContrastName>

    A contrast per factor of the fixed-effects part, as in lmer (see LmerContrastName); the random-effects terms always use treatment contrasts.

    The family: "binomial", "poisson", "Gamma", "inverse.gaussian" or "gaussian" (default, as R's; with the identity link it is a linear mixed model, a RangeError telling to use lmer). The quasi families are the error "quasi" families cannot be used in glmer.

    levels?: Record<string, readonly string[]>

    The order of the levels of a factor ({ A: ["c", "a", "b"] }), as factor(x, levels = ...) in R. For a binomial response given as strings, the first level is failure and the others success.

    The link: any of "logit", "probit", "cauchit", "cloglog", "identity", "log", "sqrt", "1/mu^2", "inverse" (default: the family's, as in R: binomial logit, poisson log, Gamma inverse, inverse.gaussian 1/mu^2, gaussian identity).

    nAGQ?: number

    1 (default): the Laplace approximation, the deviance minimised over θ and β; 0: over θ only, with β from the penalised IRLS (faster, less exact); 2 to 100: adaptive Gauss-Hermite quadrature with that many points, more exact than the Laplace approximation. A non-integer is truncated as in R (−0.5 is 0); negative values after that are a RangeError (R uses 0), above 100 R's error. Above 1 the model must have a single random-effects term with one column, such as (1 | g) (otherwise R's errors nAGQ > 1 is only available for models with a single, scalar random-effects term or AGQ only defined for a single scalar random-effects term), and the family must be binomial or poisson: for Gamma, inverse.gaussian and gaussian it is a RangeError, since lme4 holds the dispersion at 1 there and its estimates are not maximum likelihood (R fits them).

    offset?: string | Float64Array<ArrayBufferLike> | readonly (number | null)[]

    Offset added to the linear predictor: one per row of data (null or NaN drops the row), or a column name.

    start?: { fixef?: readonly number[]; theta?: readonly number[] }

    Where the search begins (it does not change the estimate unless the deviance has several minima): theta, the covariance parameters (the length of θ, diagonal elements not negative), and fixef, the fixed effects (nAGQ = 1 only), each with R's error messages.

    Type Declaration

    • Optionalfixef?: readonly number[]

      Starting values of the fixed effects (R's start = list(fixef = ...); not with nAGQ = 0, as in R).

    • Optionaltheta?: readonly number[]

      Starting values of θ (R's start = list(theta = ...)).

    weights?: string | Float64Array<ArrayBufferLike> | readonly (number | null)[]

    Prior weights (non-negative): one per row of data (null or NaN is missing and drops the row), or the name of a numeric column. For the binomial family with proportions as the response, the numbers of trials.