[R-sig-ME] distribution of random effects glmmTMB - covariance structure
bbolker @ending from gm@il@com
Thu Sep 6 21:05:23 CEST 2018
While the distribution of conditional modes is certainly not assumed
to be exactly N(0,s^2), informally, if the observed distribution of
conditional modes is far from zero-centered Gaussian, I might worry
about misspecification of the model. I know of the existence of a
literature on the diagnosis and effects of model misspecification
(especially of the distribution of conditional modes) in (G)LMMs -- e.g.
go to http://bbolker.github.io/mixedmodels-misc/glmmbib.html and search
for "misspec" -- but I don't know its contents well at all.
(1) adding group-level covariates (to explain some of the non-Normal
among-group variability) can help, if you have any such information
(2) one more question about your random-effect specification. Is time
being treated as categorical or continuous?
- if there are n time points, us(time+0|Subject) will have
n*(n+1)/2 parameters, which could get out of hand (you'll be trying to
estimate the full variance-covariance matrix among all n observations
for each subject -- you'll need lots of subjects to make this work).
Could be worth trying an ar1() model instead?
- allowing for a *continuous*, fixed effect of time in addition to
the random effect could help (again, by explaining some of the
- if continuous: I'm not sure why you would suppress the intercept
On 2018-09-06 02:42 PM, D. Rizopoulos wrote:
> Logically, the ranef() gives you the empirical Bayes estimates of the
> random effects. Note that the distribution (and as a result the variance
> and covariances) of these is not the same as the distribution you
> specified in the formula of the model. Namely, the distribution you
> define is the _prior_ distribution of the random effects, whereas the
> empirical Bayes estimates are coming from the posterior of the random
> In math terms, the choice of us() of diag() specifies the distribution
> [b] of the random effects, whereas from ranef() you get the modes or
> means of the posterior distribution
> [b | y] which is proportional to [y | b] * [b],
> where y denotes you Count outcome, and [y | b] denotes the distribution
> of your outcome.
> On 9/6/2018 7:59 PM, Vidal, Tiffany (FWE ) wrote:
>> I'm unclear about the distributional assumptions regarding the random effects in glmmTMB, using different covariance structures. It is my understanding that the default is unstructured covariance structure. When estimating a vector of random effects, what is the assumption about the distribution of the factor levels within each grouping? I'm usually assuming normality with a mean of 0 and estimated variance. This doesn't seem to hold looking at the ranef(mod) for the different grouping variables.
>> For example:
>> mod <- glmmTMB(Count ~ us(time + 0|Subject))
>> mod <- glmmTMB(Count ~ diag(time + 0|Subject))
>> Here, I'm modeling (I think) variability among subjects through time (e.g., a different subject variance in each time step), and assuming that the repeated measures within each individual subject at time t, come from some distribution. If the assumed distribution was normal with a mean of 0, I would expect the sum of the Subject BLUPs in each year to approximate 0, but that doesn't appear to be the case. Any clarification on this would be appreciated.
>> Thank you,
>> [[alternative HTML version deleted]]
>> R-sig-mixed-models using r-project.org mailing list
More information about the R-sig-mixed-models