[R] help with lmer,

Brendan Connors bconnors at sfu.ca
Thu Apr 12 01:17:23 CEST 2007


Thanks Mr. Bates,

Any suggestions on how should I go about this then? I am trying to treat 
the three replicates as a random effect in order to determine if the 
main effect (In.Out) significantly influences my dependent variable 
(nor.tot.lep) after the variance explained by the replicates is 
accounted for. Any suggestions would be immensely appreciated!

Cheers,

Brendan

Douglas Bates wrote:
> On 4/11/07, Brendan Connors <bconnors at sfu.ca> wrote:
>> Hi R-users:
>>
>> New to R and I am trying to run a GLM with random effects.
>>
>> I have 3 replicates ('Replicate) of counts of parasites ('nor.tot.lep')
>> before and after an experiment ('In.Out'). When I run lmer I get the
>> error messages (16 of each) below...
>>
>>  > lmer(nor.tot.lep ~ In.Out + (In.Out|Replicate),data=coho, family
>> =tweedie(var.power = 1,
>> + link.power = 1))
>> Generalized linear mixed model fit using PQL
>> Formula: nor.tot.lep ~ In.Out + (In.Out | Replicate)
>> Data: coho
>> Family: Tweedie(mu^1 link)
>> AIC BIC logLik deviance
>> 849.2 867.4 -419.6 839.2
>> Random effects:
>> Groups Name Variance Std.Dev. Corr
>> Replicate (Intercept) 0.78861 0.88804
>> In.Out 0.67232 0.81995 -1.000
>> Residual 2.96308 1.72136
>> number of obs: 279, groups: Replicate, 3
>
> According to this summary you have 3 distinct replicates and you are
> trying to use those three replicates to estimate 3 variance-covariance
> parameters.  It won't work.  Notice that the estimated correlation is
> -1.000.  Your estimated variance-covariance matrix is singular.
>
>>
>> Fixed effects:
>> Estimate Std. Error t value
>> (Intercept) -0.2431 0.6619 -0.3672
>> In.Out 1.6004 0.5645 2.8349
>>
>> Correlation of Fixed Effects:
>> (Intr)
>> In.Out -0.975
>> There were 30 warnings (use warnings() to see them)
>>
>>  > warnings()
>> Warning messages:
>> 1: Estimated variance-covariance for factor 'Replicate' is singular
>> in: LMEopt(x = mer, value = cv)
>> 2: nlminb returned message false convergence (8)
>> in: LMEopt(x = mer, value = cv)
>>
>> I have made sure I have the latest lme4 version, any help would be much
>> appreciated.
>>
>> Cheers,
>>
>> Brendan Connors
>> Behavioural Ecology Research Group
>>
>> ______________________________________________
>> R-help at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>



More information about the R-help mailing list