Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

phiHGLM

Fitting random effects in the residual dispersion model


Description

φ parameters are estimated by fitting a Gamma HGLM to response values computed by the parent fitting function (e.g., by HLfit in the Examples). The fitme function is used to perform this fit. The resid.model of the parent call is used to control the arguments of this fitme call.

Usage

# 'resid.model' argument of main fitting functions

Arguments

resid.model is either a formula (without left-hand side) for the dispersion parameter phi of the residual error (a log link is assumed); or a list of arguments similar to those of a standard fit. The following arguments may be useful:

formula

model formula as in formula-only case, without left-hand side. Random effects can be included and this appears to work well in simple cases (block effects, or geostatistical models) but has not been tested, or hardly so, for other cases.

family

The family is always Gamma. The default link is log. The identity link can be tried but may fail because only the log link ensures that the fitted φ is positive.

fixed

fixed values of parameters. Same usage as documented in fitme

control.dist

A list of arguments that control the computation of the distance argument of the correlation functions. Same usage as documented in HLCor

rand.family

A family object or a list of family objects describing the distribution of the random effect(s). Same usage as documented for HLfit

init, lower, upper, control

with same usage as documented in fitme, may be at least partly heeded.

Other arguments should be ignored (see Details).

Details

The following elements in resid.model should be ignored:

method

which is constrained to be identical to the method from the parent call;

control.HLfit, control.glm

constrained to be identical to the same-named controls from the parent call;

resid.model

constrained: no resid.model for a resid.model;

REMLformula

constrained to NULL;

data

The data of the parent call are used, so they must include all the variables required for the resid.model;

prior.weights

constrained: no prior weights;

verbose

constrained: will display a progress line summarizing the results of the resid.model fit at each iteration of main loop of the parent call.

init.HLfit

Ignored. Users would have hard time guessing good initial values, which would be have to be ignored in most contexts anyway.

References

Lee, Y., Nelder, J. A. and Pawitan, Y. (2006) Generalized linear models with random effects: unified analysis via h-likelihood. Chapman & Hall: London.

Examples

data("crack") # crack data, Lee et al. 2006 chapter 11 etc
 hlfit <- HLfit(y~crack0+(1|specimen), family=Gamma(log),
                data=crack, rand.family=inverse.Gamma(log), 
                resid.model=list(formula=~cycle+(1|specimen)) )

spaMM

Mixed-Effect Models, with or without Spatial Random Effects

v3.10.0
CeCILL-2
Authors
François Rousset [aut, cre, cph] (<https://orcid.org/0000-0003-4670-0371>), Jean-Baptiste Ferdy [aut, cph], Alexandre Courtiol [aut] (<https://orcid.org/0000-0003-0637-2959>), GSL authors [ctb] (src/gsl_bessel.*)
Initial release
2022-02-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.