ptmixed (version 1.1.3)

ranef: Compute random effects for Poisson-Tweedie and negative binomial mixed model

Description

Compute the BLUP (best linear unbiased predictor) of the random effects for the Poisson-Tweedie and negative binomial generalized linear mixed models (fitted through ptmixed and nbmixed respectively)

Usage

ranef(obj)

Value

A vector with the EB estimates of the random effects

Arguments

obj

an object of class ptglmm (obtained from ptmixed or nbmixed ).

Author

Mirko Signorelli

References

Signorelli, M., Spitali, P., Tsonaka, R. (2021). Poisson-Tweedie mixed-effects model: a flexible approach for the analysis of longitudinal RNA-seq data. Statistical Modelling, 21 (6), 520-545. URL: https://doi.org/10.1177/1471082X20936017

See Also

ptmixed, nbmixed

Examples

Run this code
# \donttest{

data(df1, package = 'ptmixed')

# estimate a Poisson-Tweedie or negative binomial GLMM (using
# ptmixed() or nbmixed())
fit0 = nbmixed(fixef.formula = y ~ group + time, id = id,
              offset = offset, data = df1, npoints = 5, 
              freq.updates = 200, hessian = FALSE, trace = TRUE)
              
# obtain random effect estimates
ranef(obj = fit0)
# }

Run the code above in your browser using DataLab