[R] glmer, Error: Downdated X'X is not positive definite,49

Annika annika.opperbeck at jyu.fi
Tue Nov 16 10:25:12 CET 2010


Dear list,
 
I am new to this list and I am new to the world of R. Additionally I am not
very firm in statistics either but have to deal. So here is my problem:
I have a dataset (which I attach at the end of the post) with a binomial
response variable (alive or not) and three fixed factors
(trapping,treat,sex). I do have repeated measures and would like to include
one (enclosure) random factor.
I chose to use the glmer function (and tried the lmer as well). 
      
m1<-glmer(alive~treat*sex*trapping*ID+(1|enclosure),family=binomial,data=survadult)
Both give the following error message:
       Error in mer_finalize(ans) : Downdated X'X is not positive definite,
49.
       Additionally: Warning:
       glm.fit: fitted probabilities numerically 0 or 1 occurred 
I get that there is something wrong in my dataframe, but I don`t understand
what and how I could change it.
If I run a glm without the random factor
       m1<-glm(alive~treat*sex*trapping*ID,family=binomial,data=survadult)
it works out really fine, but is the wrong analysis in my opinion. (Does glm
actually consider the repeated measures? Does glmer?)

Is glmer the right function for me and how do I deal with the error I get?

Thanks for any help for a non-professional :)

Annika


trapping	treat	sex	alive	ID	enclosure
	trapping1	m/m	f	1	400	1
	trapping1	m/m	f	1	401	1
	trapping1	m/m	f	1	402	1
	trapping1	m/m	m	0	403	1
	trapping1	m/m	m	1	404	1
	trapping1	m/m	m	1	405	1
	trapping1	m/p	f	1	406	2
	trapping1	m/p	f	1	407	2
	trapping1	m/p	f	1	408	2
	trapping1	m/p	m	1	409	2
	trapping1	m/p	m	1	410	2
	trapping1	m/p	m	1	411	2
	trapping1	p/p	f	1	412	3
	trapping1	p/p	f	1	413	3
	trapping1	p/p	f	1	414	3
	trapping1	p/p	m	1	415	3
	trapping1	p/p	m	1	416	3
	trapping1	p/p	m	1	417	3
	trapping1	p/p	f	1	418	4
	trapping1	p/p	f	1	419	4
	trapping1	p/p	f	1	420	4
	trapping1	p/p	m	1	421	4
	trapping1	p/p	m	1	422	4
	trapping1	p/p	m	1	423	4
	trapping1	m/m	f	1	424	5
	trapping1	m/m	f	1	425	5
	trapping1	m/m	f	1	426	5
	trapping1	m/m	m	1	427	5
	trapping1	m/m	m	1	428	5
	trapping1	m/m	m	1	429	5
	trapping1	p/m	f	1	430	6
	trapping1	p/m	f	1	431	6
	trapping1	p/m	f	1	432	6
	trapping1	p/m	m	1	433	6
	trapping1	p/m	m	1	434	6
	trapping1	p/m	m	1	435	6
	trapping1	m/p	f	1	436	7
	trapping1	m/p	f	1	437	7
	trapping1	m/p	f	1	438	7
	trapping1	m/p	m	1	439	7
	trapping1	m/p	m	1	440	7
	trapping1	m/p	m	1	441	7
	trapping1	p/p	f	1	442	8
	trapping1	p/p	f	1	443	8
	trapping1	p/p	f	1	444	8
	trapping1	p/p	m	1	445	8
	trapping1	p/p	m	1	446	8
	trapping1	p/p	m	1	447	8
	trapping1	m/m	f	1	448	9
	trapping1	m/m	f	1	449	9
	trapping1	m/m	f	1	450	9
	trapping1	m/m	m	1	451	9
	trapping1	m/m	m	1	452	9
	trapping1	m/m	m	1	453	9
	trapping1	p/m	f	1	454	10
	trapping1	p/m	f	1	455	10
	trapping1	p/m	f	1	456	10
	trapping1	p/m	m	1	457	10
	trapping1	p/m	m	1	458	10
	trapping1	p/m	m	1	459	10
	trapping1	m/m	f	1	460	11
	trapping1	m/m	f	1	461	11
	trapping1	m/m	f	1	462	11
	trapping1	m/m	m	1	463	11
	trapping1	m/m	m	1	464	11
	trapping1	m/m	m	0	465	11
	trapping1	p/p	f	1	466	12
	trapping1	p/p	f	1	467	12
	trapping1	p/p	f	1	468	12
	trapping1	p/p	m	1	469	12
	trapping1	p/p	m	0	470	12
	trapping1	p/p	m	1	471	12
	trapping1	m/p	f	1	472	13
	trapping1	m/p	f	1	473	13
	trapping1	m/p	f	1	474	13
	trapping1	m/p	m	1	475	13
	trapping1	m/p	m	1	476	13
	trapping1	m/p	m	1	477	13
	trapping2	m/m	f	1	478	1
	trapping2	m/m	f	1	479	1
	trapping2	m/m	f	1	480	1
	trapping2	m/m	m	1	481	1
	trapping2	m/m	m	1	482	1
	trapping2	m/m	m	1	483	1
	trapping2	m/p	f	1	484	2
	trapping2	m/p	f	1	485	2
	trapping2	m/p	f	1	486	2
	trapping2	m/p	m	0	487	2
	trapping2	m/p	m	1	488	2
	trapping2	m/p	m	1	489	2
	trapping2	p/p	f	1	490	3
	trapping2	p/p	f	1	491	3
	trapping2	p/p	f	1	492	3
	trapping2	p/p	m	1	493	3
	trapping2	p/p	m	1	494	3
	trapping2	p/p	m	1	495	3
	trapping2	p/p	f	1	496	4
	trapping2	p/p	f	1	497	4
	trapping2	p/p	f	1	498	4
	trapping2	p/p	m	1	499	4
	trapping2	p/p	m	1	500	4
	trapping2	p/p	m	1	501	4
	trapping2	m/m	f	1	502	5
	trapping2	m/m	f	1	503	5
	trapping2	m/m	f	1	504	5
	trapping2	m/m	m	1	505	5
	trapping2	m/m	m	1	506	5
	trapping2	m/m	m	1	507	5
	trapping2	p/m	f	1	508	6
	trapping2	p/m	f	1	509	6
	trapping2	p/m	f	1	510	6
	trapping2	p/m	m	1	511	6
	trapping2	p/m	m	1	512	6
	trapping2	p/m	m	1	513	6
	trapping2	m/p	f	1	514	7
	trapping2	m/p	f	1	515	7
	trapping2	m/p	f	1	516	7
	trapping2	m/p	m	1	517	7
	trapping2	m/p	m	1	518	7
	trapping2	m/p	m	1	519	7
	trapping2	p/p	f	1	520	8
	trapping2	p/p	f	1	521	8
	trapping2	p/p	f	1	522	8
	trapping2	p/p	m	1	523	8
	trapping2	p/p	m	1	524	8
	trapping2	p/p	m	1	525	8
	trapping2	m/m	f	1	526	9
	trapping2	m/m	f	1	527	9
	trapping2	m/m	f	1	528	9
	trapping2	m/m	m	1	529	9
	trapping2	m/m	m	1	530	9
	trapping2	m/m	m	1	531	9
	trapping2	p/m	f	1	532	10
	trapping2	p/m	f	1	533	10
	trapping2	p/m	f	1	534	10
	trapping2	p/m	m	1	535	10
	trapping2	p/m	m	1	536	10
	trapping2	p/m	m	0	537	10
	trapping2	m/m	f	1	538	11
	trapping2	m/m	f	1	539	11
	trapping2	m/m	f	1	540	11
	trapping2	m/m	m	1	541	11
	trapping2	m/m	m	0	542	11
	trapping2	m/m	m	1	543	11
	trapping2	p/p	f	1	544	12
	trapping2	p/p	f	1	545	12
	trapping2	p/p	f	1	546	12
	trapping2	p/p	m	0	547	12
	trapping2	p/p	m	1	548	12
	trapping2	p/p	m	1	549	12
	trapping2	m/p	f	1	550	13
	trapping2	m/p	f	1	551	13
	trapping2	m/p	f	1	552	13
	trapping2	m/p	m	1	553	13
	trapping2	m/p	m	1	554	13
	trapping2	m/p	m	1	555	13
	trapping3	m/m	f	1	556	1
	trapping3	m/m	f	1	557	1
	trapping3	m/m	f	1	558	1
	trapping3	m/m	m	1	559	1
	trapping3 	m/m	m	1	560	1
	trapping3 	m/m	m	1	561	1
	trapping3	m/p	f	1	562	2
	trapping3	m/p	f	1	563	2
	trapping3	m/p	f	1	564	2
	trapping3	m/p	m	1	565	2
	trapping3	m/p	m	1	566	2
	trapping3	m/p	m	0	567	2
	trapping3	p/p	f	1	568	3
	trapping3	p/p	f	1	569	3
	trapping3	p/p	f	1	570	3
	trapping3	p/p	m	1	571	3
	trapping3	p/p	m	1	572	3
	trapping3	p/p	m	1	573	3
	trapping3	p/p	f	1	574	4
	trapping3	p/p	f	1	575	4
	trapping3	p/p	f	1	576	4
	trapping3	p/p	m	1	577	4
	trapping3	p/p	m	1	578	4
	trapping3	p/p	m	1	579	4
	trapping3	m/m	f	1	580	5
	trapping3	m/m	f	1	581	5
	trapping3	m/m	f	1	582	5
	trapping3	m/m	m	1	583	5
	trapping3	m/m	m	0	584	5
	trapping3	m/m	m	1	585	5
	trapping3	p/m	f	1	586	6
	trapping3	p/m	f	1	587	6
	trapping3	p/m	f	1	588	6
	trapping3	p/m	m	0	589	6
	trapping3	p/m	m	1	590	6
	trapping3	p/m	m	1	591	6
	trapping3	m/p	f	1	592	7
	trapping3	m/p	f	1	593	7
	trapping3	m/p	f	1	594	7
	trapping3	m/p	m	1	595	7
	trapping3	m/p	m	1	596	7
	trapping3	m/p	m	1	597	7
	trapping3	p/p	f	1	598	8
	trapping3	p/p	f	1	599	8
	trapping3	p/p	f	1	600	8
	trapping3	p/p	m	1	601	8
	trapping3	p/p	m	1	602	8
	trapping3	p/p	m	1	603	8
	trapping3	m/m	f	1	604	9
	trapping3	m/m	f	1	605	9
	trapping3	m/m	f	1	606	9
	trapping3	m/m	m	0	607	9
	trapping3	m/m	m	1	608	9
	trapping3	m/m	m	1	609	9
	trapping3	p/m	f	1	610	10
	trapping3	p/m	f	0	611	10
	trapping3	p/m	f	1	612	10
	trapping3	p/m	m	1	613	10
	trapping3	p/m	m	1	614	10
	trapping3	p/m	m	0	615	10
	trapping3	m/m	f	1	616	11
	trapping3	m/m	f	1	617	11
	trapping3	m/m	f	1	618	11
	trapping3	m/m	m	0	619	11
	trapping3	m/m	m	0	620	11
	trapping3	m/m	m	0	621	11
	trapping3	p/p	f	1	622	12
	trapping3	p/p	f	0	623	12
	trapping3	p/p	f	1	624	12
	trapping3	p/p	m	0	625	12
	trapping3	p/p	m	0	626	12
	trapping3	p/p	m	0	627	12
	trapping3	m/p	f	1	628	13
	trapping3	m/p	f	1	629	13
	trapping3	m/p	f	1	630	13
	trapping3	m/p	m	1	631	13
	trapping3	m/p	m	1	632	13
	trapping3	m/p	m	0	633	13
	trapping4	m/m	f	1	634	1
	trapping4	m/m	f	1	635	1
	trapping4	m/m	f	1	636	1
	trapping4	m/m	m	1	637	1
	trapping4 	m/m	m	1	638	1
	trapping4 	m/m	m	1	639	1
	trapping4	m/p	f	1	640	2
	trapping4	m/p	f	1	641	2
	trapping4	m/p	f	0	642	2
	trapping4	m/p	m	1	643	2
	trapping4	m/p	m	1	644	2
	trapping4	m/p	m	0	645	2
	trapping4	p/p	f	1	646	3
	trapping4	p/p	f	0	647	3
	trapping4	p/p	f	1	648	3
	trapping4	p/p	m	1	649	3
	trapping4	p/p	m	0	650	3
	trapping4	p/p	m	1	651	3
	trapping4	p/p	f	1	652	4
	trapping4	p/p	f	1	653	4
	trapping4	p/p	f	1	654	4
	trapping4	p/p	m	1	655	4
	trapping4	p/p	m	1	656	4
	trapping4	p/p	m	1	657	4
	trapping4	m/m	f	1	658	5
	trapping4	m/m	f	1	659	5
	trapping4	m/m	f	1	660	5
	trapping4	m/m	m	1	661	5
	trapping4	m/m	m	0	662	5
	trapping4	m/m	m	0	663	5
	trapping4	p/m	f	1	664	6
	trapping4	p/m	f	1	665	6
	trapping4	p/m	f	1	666	6
	trapping4	p/m	m	1	667	6
	trapping4	p/m	m	0	668	6
	trapping4	p/m	m	0	669	6
	trapping4	m/p	f	0	670	7
	trapping4	m/p	f	0	671	7
	trapping4	m/p	f	0	672	7
	trapping4	m/p	m	0	673	7
	trapping4	m/p	m	0	674	7
	trapping4	m/p	m	0	675	7
	trapping4	p/p	f	1	676	8
	trapping4	p/p	f	1	677	8
	trapping4	p/p	f	0	678	8
	trapping4	p/p	m	1	679	8
	trapping4	p/p	m	1	680	8
	trapping4	p/p	m	1	681	8
	trapping4	m/m	f	1	682	9
	trapping4	m/m	f	1	683	9
	trapping4	m/m	f	1	684	9
	trapping4	m/m	m	1	685	9
	trapping4	m/m	m	1	686	9
	trapping4	m/m	m	0	687	9
	trapping4	p/m	f	0	688	10
	trapping4	p/m	f	1	689	10
	trapping4	p/m	f	1	690	10
	trapping4	p/m	m	0	691	10
-- 
View this message in context: http://r.789695.n4.nabble.com/glmer-Error-Downdated-X-X-is-not-positive-definite-49-tp3044470p3044470.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list