[R-sig-ME] confint.merMod, bootstrap and weights
bbolker at gmail.com
Mon Mar 14 15:57:22 CET 2016
In general profile confidence intervals (the default method for
confidence intervals) are a good intermediate between Wald intervals and
bootstrap intervals, in both computational cost and accuracy. If you
can decide how you want weights to be used, you might be able to use
assignInNamespace() to hack lme4:::simfunList$poisson, which is
currently defined as
function (object, nsim, ftd = fitted(object), wts = weights(object))
wts <- weights(object)
if (any(wts != 1))
warning("ignoring prior weights")
rpois(nsim * length(ftd), ftd)
On 16-03-14 10:17 AM, Denis Haine wrote:
> That's what I thought, that the weighting was not taken into account.
> The weights are used to estimate an underlying causal model. The Poisson
> model is used as a Cox regression model with 2-level random effects.
> I believe I have to write my own boostrap function, or be happy with the
> Wald method for confint.
>> The simulation function (sfun()) that's at the core of the parametric
>> bootstrap algorithm is ignoring your specified prior weights. Poisson
>> models with weights are somewhat unusual; what are the weights in your
>> model supposed to signify? If you were simulating the data, how would
>> you incorporate the weights in the simulation procedure?
>> Ben Bolker
>> On 16-03-13 02:30 PM, Denis Haine wrote:
>>> I ran a model as
>>> glmer(y ~ x, family = poisson, data, weights = w)
>>> and then tried to get confidence intervals with the following:
>>> confint(model, method = "boot", parallel = "multicore", ncpus = 4)
>>> However I'm getting the following warning message that I'm not receiving
>>> when using method "Wald" instead of "boot":
>>> Warning message:
>>> In sfun(object, nsim = 1, ftd = rep_len(musim, n * nsim), wts = weights)
>>> ignoring prior weights
>>> What's the meaning of this message?
>>> Thanks for your help,
> [[alternative HTML version deleted]]
> R-sig-mixed-models at r-project.org mailing list
More information about the R-sig-mixed-models