Skip to content

nlmer and the binomial distribution.

5 messages · Ken Knoblauch, Ben Bolker, Rolf Turner

#
Just a point of note, that the repeated package is on CRAN

https://cran.r-project.org/web/packages/repeated/index.html

and the gnm package on CRAN might be able to handle this, too,

https://cran.r-project.org/web/packages/gnm/index.html

Good luck.

  
    
#
On 2019-02-10 1:43 p.m., Kenneth Knoblauch wrote:
Cool, thanks!
#
Thanks to Ben Bolker and Kenneth Knoblauch for their replies.  I have 
already investigated the "repeated" package --- and got some mileage out 
of it, thanks to the assistance of the maintainer, Bruce Swihart.

I was not entirely satisfied with the results, since the software in the 
"repeated" package only accommodates a "random intercept", and there is 
evidence from investigating the more standard models that can be fitted 
using glmer() that a random *slope* is needed as well.  Bruce has said 
that he *may* be able to incorporate the "random slope" idea, in a sense 
that I can make precise in the context of the particular non-linear 
model that I have in mind.  However it is slowly dawning on me that 
making this modification is probably an overwhelmingly difficult task.

I guess that I was na?ve in thinking that nlmer might handle it for me.

cheers,

Rolf Turner
#
I guess overwhelmingly difficult is in the eye of the beholder.  Any
chance of a small example of what you want to do? Although TMB is
written in an extended form of C++ rather than R, it might not be too
horrible. A version of the classic orange tree example is here:
https://kaskr.github.io/adcomp/orange_big_8cpp-example.html (it could
use more comments/there are a few slightly weird-looking things ...)
On Sun, Feb 10, 2019 at 4:08 PM Rolf Turner <r.turner at auckland.ac.nz> wrote:
#
On 2/11/19 12:24 PM, Ben Bolker wrote:

            
Thank you for this kind offer to investigate further.

It just so happens that I have to hand a toy data set that I constructed 
for Bruce Swihart to use in his efforts to help me.  This data set is 
attached as "simdat.txt".  This a result of a dput().  To obtain the 
data do:

     X <- dget("simdat.txt")

I have also attached what I hope is a reasonably lucid explanation of 
the model that I am trying to fit (in "problem.pdf").

Thanks again for taking a look at this.

cheers,

Rolf