[R-sig-ME] nAGQ = 0

Poe, John jdpo223 at g.uky.edu
Thu Sep 7 00:57:09 CEST 2017


This is where my being a political scientist on a listserv full of
definitely not political scientists is going to make me look dumb. I've
never actually seen a model specification like that before for a multilevel
model. Is the outcome supposed to be the proportion dead out of the total
population for each row? I'm missing something about this that is probably
very obvious.

After fiddling with it I was able to get it to converge for one chain but I
wouldn't trust it at all right now.

On Wed, Sep 6, 2017 at 5:48 PM, Rolf Turner <r.turner at auckland.ac.nz> wrote:

> On 04/09/17 10:51, Poe, John wrote:
>
> <SNIP>
>
> You can try using the BRMS package if you aren't comfortable switching to
>> something totally unfamiliar. It's a wrapper for Stan designed to use lme4
>> syntax and a lot of good default settings. It's pretty easy to use if you
>> know lme4 syntax and can read up on mcmc diagnostics.
>>
>
> <SNIP>
>
> I remember a quote from some Brit comedy series (it starred the bloke who
> played Terry on "Minder"):  "My mother always said that you should try
> anything once, except for incest and Morris dancing.  She was right about
> the Morris dancing."
>
> On that basis I decided to try using brms.  I installed the package from
> CRAN with no real problems, although there were some slightly worrying and
> highly technical warnings from "rstan" --- I think:
>
> warning: non-static data member initializers only available with
>> -std=c++11 or -std=gnu++11
>>        bool has_var_ = false;
>>
>
> Then I read the vignette brms_overview a bit, and plunged in with trying
> to fit a model.  Needless to say, the attempt didn't get much past square
> zero.  I tried it again with my artificial simulated data that I talked
> about in the post that started off this train of craziness (it elicited the
> suggestion from Tony Ives that I try using nAGQ=0).  The result was the
> same --- square zero + epsilon:
>
> Compiling the C++ model
>> Start sampling
>>
>> SAMPLING FOR MODEL 'binomial(cloglog) brms-model' NOW (CHAIN 1).
>> Rejecting initial value:
>>   Log probability evaluates to log(0), i.e. negative infinity.
>>   Stan can't start sampling from this initial value.
>>
>     .
>     .
>     .
>
>> Rejecting initial value:
>>   Log probability evaluates to log(0), i.e. negative infinity.
>>   Stan can't start sampling from this initial value.
>> Rejecting initial value:
>>   Log probability evaluates to log(0), i.e. negative infinity.
>>   Stan can't start sampling from this initial value.
>>
>> Initialization between (-2, 2) failed after 100 attempts.  Try specifying
>> initial values, reducing ranges of constrained values, or reparameterizing
>> the model.
>> [1] "Error in sampler$call_sampler(args_list[[i]]) : Initialization
>> failed."
>> error occurred during calling the sampler; sampling not done
>>
>
> Since I'm flying completely blind here (no idea WTF I'm doing) I have come
> to a shuddering halt.
>
> I have attached my function "artSim.R" to generate the artificial data,
> and a script to source to effect the call to brm() that I used.
>
> If some kind mixed models guru could take a look and point out to me just
> what bit of egregious stupidity I am committing, I'd be ever so humbly
> grateful.  I don't know from Bayesian stuff (priors, and like that) at all,
> so it's likely to be something pretty stupid and pretty simple in the first
> instance.
>
> cheers,
>
> Rolf Turner
>
>
> --
> Technical Editor ANZJS
> Department of Statistics
> University of Auckland
> Phone: +64-9-373-7599 ext. 88276
>



-- 




Thanks,
John


John Poe
Research Methodologist
UK Center for Public Health Services & Systems Research
University of Kentucky
111 Washington Avenue, Room 203a
Lexington, KY 40536
www.johndavidpoe.com

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list