<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    On 12-04-04 09:55 AM, Ian Taylor wrote:<br>
    <br>
    I pretty sure that you (almost) all think I'm unreasonable.   I've
    been told (too many times) that R was designed by a bunch of
    geniuses.  Here is a typical attempt to make a trivial change to a
    model<br>
    by one of the greatest heroes of open source.<br>
    <br>
    <pre>On Thu, Sep 30, 2010 at 3:29 PM, Douglas Bates <<a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models">bates at stat.wisc.edu</a>> wrote:
><i> Unfortunately an nlmer model is not appropriate for a binary response,
</i>><i> because it doesn't appropriately weight the residuals.
</i>><i>
</i>><i> Incorporating a non-zero guessing parameter requires a generalized
</i>><i> nonlinear mixed model if you need to estimate the guessing parameter.
</i>><i> The long term plan is to allow such a model.  This is the reason that
</i>><i> Martin and I worked on factoring out the internal code dealing with
</i>><i> different kinds of models for the expected response.  Nonlinear models
</i>><i> affect these in one way and generalized linear models in another so
</i>><i> you need to chain these effects.
</i>><i>
</i>><i> For the particular case that Robert is considering, in which the
</i>><i> guessing parameter is fixed at 0.33 I think it may be possible to use
</i>><i> the mafc.logit link from the psyphy package with lme4a, the
</i>><i> development version of lme4.  I am currently installing the necessary
</i>><i> packages to see if I can make it work.  My thanks to Robert for making
</i>><i> the data available so we can test it.
</i>
It wasn't as easy as I had hoped it would be.  I'm getting an error
when evaluating the linkfun (and, presumably, will get such an error
for all the other functions in the family).  It probably has to do
with the environment in which the function is evaluated in that it
can't see the value of 'm'.

I'm not sure if I will be able to fix it in a reasonable amount of
time (I should be grading assignments from one of my classes right
now).

Actually the whole design of the glm families should be reconsidered
but we'll save that for another time.

><i> On Mon, Sep 27, 2010 at 11:25 AM, Manuel Morales
</i>><i> <<a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models">Manuel.A.Morales at williams.edu</a>> wrote:
</i>>><i> I found this link doing a search for your error message on Google:
</i>>><i> <a href="https://stat.ethz.ch/pipermail/r-sig-mixed-models/2007q4/000408.html">https://stat.ethz.ch/pipermail/r-sig-mixed-models/2007q4/000408.html</a>
</i>>><i>
</i>>><i> Following the recipe:
</i>>><i> grModel <- function(x,y,a,b,c,d) .33 + .67*(exp(log(x)*a+y*b+log(x)*y*c
</i>>><i> + d))/
</i>>><i>  (1+exp( log(x)*a + y*b +log(x)*y*c + d))
</i>>><i>
</i>>><i> grModg <- deriv(body(grModel), namevec = c("a","b","c","d"),
</i>>><i> function.arg=grModel)
</i>>><i>
</i>>><i> mod3 <- nlmer(Correct~grModg(Concentrat,Test,a,b,c,d)~(Test|Code),
</i>>><i>              start = c(a = 0.115, b=-0.1, c=0.65, d=-3),
</i>>><i>              data = rawdata)
</i>>><i> Which appears to work.
</i>>><i>
</i>>><i> My messages haven't been posted to R, so you may want to post again with
</i>>><i> this solution if it works for you.
</i>>><i>
</i>>><i> Best,
</i>>><i>
</i>>><i> Manuel
</i>>><i>
</i>>><i> On Mon, 2010-09-27 at 15:54 +0200, Robert Miller wrote:
</i>>>><i> Hello everyone,
</i>>>><i>
</i>>>><i> Recently i tried to predict the discrimination probability of a chemosignal
</i>>>><i> by its concentration and an experimental manipulation factor (term:
</i>>>><i> concentration*x + test*b + concentration*test*c + d) with nested factor
</i>>>><i> "manipulation" within "participants". For statistical analysis i needed to
</i>>>><i> incorporate a fixed guessing probability into my model (similiar to a 3-PL
</i>>>><i> IRT model) resulting in the following equation:
</i>>>><i>
</i>>>><i> P(correct) = 0.33 + 0.67*(exp(term)/(1 + exp(term)))
</i>>>><i>
</i>>>><i> As i found no way to do so via the glmer()-function of the lme4-package, i
</i>>>><i> tried to use nlmer() but unfortunately even the simplest analysis with just
</i>>>><i> the concentration factor and intercept resulted in cryptic error messages.
</i>>>><i>
</i>>>><i> Syntax:
</i>>>><i> library(lme4)
</i>>>><i> rawdata <- read.csv2("<a href="http://dl.dropbox.com/u/7147679/AND_data.csv">http://dl.dropbox.com/u/7147679/AND_data.csv</a>")
</i>>>><i>
</i>>>><i> mod1 <- glmer(Correct ~ log(Concentrat) * Test + (Test|Code), family =
</i>>>><i> binomial, data=rawdata) #works fine but is inappropriate
</i>>>><i> mod2 <- nlmer(Correct ~ .33 + .67*(exp(log(Concentrat)*a+d))
</i>>>><i> /(1+exp(log(Concentrat)*a+d)) ~ (Test|Code), start = c(a = 0.1, d = -3),
</i>>>><i> data = rawdata) #doesnt work
</i>>>><i> mod3 <- nlmer(Correct ~ .33 + .67*(exp(log(Concentrat)*a + Test*b +
</i>>>><i> log(Concentrat)*Test*c + d))/(1+exp( log(Concentrat)*a + Test*b +
</i>>>><i> log(Concentrat)*Test*c + d)) ~ (Test|Code), start = c(a = 0.115,b = -0.05,
</i>>>><i> c= 0.065, d= -3), data = rawdata) #doesnt work either
</i>>>><i>
</i>>>><i> Even without specifying random effects nls() doesnt work, but brute force
</i>>>><i> ML-parameter estimation on the aggregated data produces reasonable results.
</i>>>><i>
</i>>>><i> Right now I'm quite desperate and would appreciate any help.
</i>>>><i> Thank you
</i>>>><i> Robert Miller
</i>>>><i>
</i>>>><i> _______________________________________________
</i>>>><i> <a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models">R-sig-mixed-models at r-project.org</a> mailing list
</i>>>><i> <a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models">https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models</a>
</i>>><i>
</i>>><i> --
</i>>><i> <a href="http://mutualism.williams.edu">http://mutualism.williams.edu</a>
</i>>><i>
</i>>><i> _______________________________________________
</i>>><i> <a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models">R-sig-mixed-models at r-project.org</a> mailing list
</i>>><i> <a href="https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models">https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models</a>
</i>>><i>
</i>><i>
</i>

</pre>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <blockquote
cite="mid:CAOUH9r6-=0-3CaDJhgdQom1fSzhvxnPKOpXiJHAMisep1evarQ@mail.gmail.com"
      type="cite">I like the formality and the fact that this is written
      down.
      <div>In a case where a bug is found after release, what would
        happen: a repeat of the full procedure, a shorter testing phase
        for the bug fix, or what?</div>
      <div>
        -Ian<br>
        <br>
        <div class="gmail_quote">On Wed, Apr 4, 2012 at 9:49 AM, Arni
          Magnusson <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:arnima@hafro.is">arnima@hafro.is</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            I have updated the heading to "Annual Release", and added a
            couple of explanatory sentences at the top and bottom of the
            page.<br>
            <br>
            Thanks for posting this very useful reference, Johnoel.<span
              class="HOEnZb"><font color="#888888"><br>
                <br>
                Arni</font></span>
            <div class="im HOEnZb"><br>
              <br>
              <br>
              <br>
              On Wed, 4 Apr 2012, John Sibert wrote:<br>
              <br>
              <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
                0.8ex; border-left: 1px solid rgb(204, 204, 204);
                padding-left: 1ex;">
                It looks rather formal.<br>
                <br>
                How frequently would there be a new release?<br>
                <br>
                <br>
                <br>
              </blockquote>
              <br>
            </div>
            <div class="HOEnZb">
              <div class="h5">
                <blockquote class="gmail_quote" style="margin: 0pt 0pt
                  0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204);
                  padding-left: 1ex;">
                  On Wed, 3 Ap 2012, Johnoel Ancheta wrote:<br>
                  <br>
                  <blockquote class="gmail_quote" style="margin: 0pt 0pt
                    0pt 0.8ex; border-left: 1px solid rgb(204, 204,
                    204); padding-left: 1ex;">
                    <a moz-do-not-send="true"
                      href="http://admb-project.org/developers/admb-release-procedure"
                      target="_blank">http://admb-project.org/developers/admb-release-procedure</a><br>
                  </blockquote>
                  <br>
                </blockquote>
                _______________________________________________<br>
                Developers mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Developers@admb-project.org"
                  target="_blank">Developers@admb-project.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.admb-project.org/mailman/listinfo/developers"
                  target="_blank">http://lists.admb-project.org/mailman/listinfo/developers</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Developers@admb-project.org">Developers@admb-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.admb-project.org/mailman/listinfo/developers">http://lists.admb-project.org/mailman/listinfo/developers</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>