I ran a mixed effect model in R by using lme() to analyze the following data (an excerpt is shown in the following):

   name   day daily_amount lag_raised_amount inv_count length
  <chr> <dbl>        <dbl>             <dbl>     <dbl>  <dbl>
1 abcde     2          232              1901        20     58
2 abcde     3         1023              2133        23     58
3 abcde     4          101              3156        24     58
4 abcde     5            0              3257        24     58
5 abcde     6            0              3257        24     58
6 abcde     7         4500              3257        24     58

In sum I have an unbalanced panel with the following metrics

$n=name=131, T=day=8-102, N=6680$

Background of the data set: I observed funding campaigns of companies on a daily basis. In a first step I want to measure some kind of "herding", specifically whether the daily_amount raised on day $t$ depends on the total lag_raised_amount observed on day $t-1$ (plus controlled for various company-sepcific fixed effects such as (campaign)length and time-varying effects such as investor count).

I ran the following (here abbreviated) model to account for this structure and auto-correlation:

mixed <- lme(log(daily_amount+1) ~ lag_raised_amount_log + I(lag_raised_amount_log^2)
             + log(lag_inv_count+1) + I(log(lag_inv_count^2+1)) + log(length) 
             + day + I(day^2) 
             , random = list(~day|name), data = panel, correlation = corAR1())

Assessing the the fit of this model gives me now a headache for some time:

The QQ-Plot and the binned residuals as suggested by Gelman and Hill (2007) look fine. enter image description here enter image description here

The normal residuals plot, however, looks a bit weird to me: it is somewhat turned by 45 degrees and the straight "line" looks off.

enter image description here

I suspect that this may be due to the fact that ~48% of my DV are zeros, but after trying for days I have honestly no clue what to do about. enter image description here

My questions:

  1. Is the residual plot as alarming as I think?
  2. What can I do about it, specifically, how can I better account for the zero-inflated DV? I know quite a bit about modelling zero-inflated continuous DVs with hurdle models, but I haven't found anything comparable in context of mixed effects models (+ I am not sure whether this is necessary at all).

1 Answer 1

  1. In my opinion yes, this doesn't look ideal.

  2. http://glmmadmb.r-forge.r-project.org allows specifying constant zero-inflated GLMMs with a range of distribution, including the negative binomial, which would be a candidate here. However, afaik, you can't specify the AR1 temporal structure with this function. The only way I am aware to specify zero-inflation, arbitrary distributions and temporal structure at the same time is using directly one of the general modeling environments, such as Jags, STAN, or ADMB. Before going there, however, I would probably fit the glmmadmb first and check if there is temporal correlation in the first place.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.