[R-sig-ME] Opaque error message from clmm

Rune Haubo rhbc at imm.dtu.dk
Tue Oct 4 10:04:56 CEST 2011


Cyrus,

On 29 September 2011 18:26, Cyrus Shaoul <cyrus.shaoul at ualberta.ca> wrote:
> Hi All,
>
> I seem to have solved my own problem. I had been using a log transform. When
> I removed the log transform, the distribution changed to this:
>
> summary(CondProb.post)
>    Min.   1st Qu.    Median      Mean   3rd Qu.      Max.
> 0.0000024 0.0007041 0.0032200 0.0420000 0.0148300 1.0000000
>
>  from this
>
> summary(log(CondProb.post))
>   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
> -12.940  -7.259  -5.738  -5.699  -4.211   0.000
>
> An now my CLMM is working again. I am still perplexed by the error message!
> Any idea why taking the log of a predictor would cause the CLMM to fail?

I am glad that you found a solution.

During model fitting it appears that some of the elements of a vector
denoted phi2 are set to NaNs causing the estimation routine to choke.
Mathematically this vector should contain positive numbers, but
somehow some operation introduces negative numbers or NaNs, Infs, etc.
I have not yet found the time to track this down, (and not given it a
high priority, since it appears to be quite rare) but transforming a
predictor as you did or changing the link function (e.g. logit to
probit) often solves the problem.

Regards,
Rune

>
> (I am using the ordinal package v. 2011.08-11 on Mac OS X 10.7 and R 2.13.1)
>
> -Cyrus
>
>
> On Thu, Sep 29, 2011 at 1:16 AM, Cyrus Shaoul <cyrus.shaoul at ualberta.ca>wrote:
>
>> Dear Rune, R-Sig-ME list members,
>>
>> I have question. I added a fixed effect, CondProb.post, to a model that was
>> working well, and
>> now I am getting an error message.
>>
>> > fmm3.post <- clmm(orank~
>> + l.resp.w4f +l.resp.t2f + l.respFreq + CondProb.post
>> +(1|subj)+(1|item),Hess=T,data=quad.post)
>>
>> *Error in if (maxGrad < rho$ctrl$gradTol) { :
>>  missing value where TRUE/FALSE needed
>> In addition: Warning message:
>> In sqrt(phi2) : NaNs produced*
>>
>> I am not sure what about this fixed effect is causing problems....
>>
>> Here is the summary of it:
>>
>> summary(quad.post$CondProb.post)
>>    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
>> -12.940  -7.259  -5.738  -5.699  -4.211   0.000
>>
>> Thanks so much for your help,
>>
>> Cyrus
>>
>> --
>> http://www.ualberta.ca/~cshaoul/
>>
>>
>
>
> --
> http://www.ualberta.ca/~cshaoul/
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>



-- 
Rune Haubo Bojesen Christensen

Ph.D. Student, M.Sc. Eng.
Phone: (+45) 45 25 33 63
Mobile: (+45) 30 26 45 54

DTU Informatics, Section for Statistics
Technical University of Denmark, Build. 305, Room 122,
DK-2800 Kgs. Lyngby, Denmark




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