[R-lang] Error message in mixed-effects logistic regression

Jakke Tamminen j.tamminen at psych.york.ac.uk
Fri Aug 15 04:27:14 PDT 2008


Dear R-lang group,

I have been trying to learn about mixed-effects logistic regression with the
help of Florian Jaeger's excellent new JML paper. I keep getting stuck with
a strange error message though. I'm a complete R and regression beginner, so
please have patience!

The experiment I'm trying to analyse is quite simple. It's a phoneme
categorisation task, where participants categorise ambiguous phonemes as /t/
or /d/, on three steps from a /t/-/d/ continuum. The main manipulation is
between participants who have been biased to respond /d/ and participants
who have been biased to respond /t/ (by  earlier presenting the ambiguous
sound in a lexical context supporting a /t/ or /d/ interpretation). The
experiment is repeated on three days to see if the effect of bias persists
over time. 

This is the model I'm trying to fit:

tdMID.lmer1=lmer(Response~Bias+Day*Step+(1+Day*Step|Subject),data=E1tdMID,fa
mily="binomial")

and the error message I get is as follows:

Error in if (any(sd < 0)) return("'sd' slot has negative entries") : 
        missing value where TRUE/FALSE needed

I have no problems with either (I attach the output at the end of the
message):

tdMID.lmer2=lmer(Response~Bias+Day*Step+(1+Step|Subject),data=E1tdMID,family
="binomial")

or

tdMID.lmer3=lmer(Response~Bias+Day*Step+(1+Day|Subject),data=E1tdMID,family=
"binomial")

or

tdMID.lmer4=lmer(Response~Bias+Day*Step+(1|Subject),data=E1tdMID,family="bin
omial")

Has anyone seen this error message before, or have any ideas where I'm going
wrong?

Many thanks in advance,

Jakke

> tdMID.lmer2
Generalized linear mixed model fit using Laplace
Formula: Response ~ Bias + Day * Step + (1 + Step | Subject) 
   Data: E1tdMID
 Family: binomial(logit link)
  AIC  BIC logLik deviance
 3315 3412  -1641     3283
Random effects:
 Groups  Name        Variance Std.Dev. Corr          
 Subject (Intercept) 1.41442  1.18930                
         Steptd3     0.65114  0.80693  -0.704        
         Steptd4     1.38725  1.17781  -0.549  0.938 
number of obs: 3232, groups: Subject, 36

Estimated scale (compare to  1 )  0.949306 

Fixed effects:
                Estimate Std. Error z value Pr(>|z|)
(Intercept)       1.4648     0.2853   5.134 2.84e-07
Biast            -0.7345     0.3096  -2.373  0.01766
Dayday2           0.3926     0.1881   2.087  0.03686
Dayday3           0.6341     0.1938   3.272  0.00107
Steptd3          -1.6801     0.2229  -7.536 4.84e-14
Steptd4          -2.8906     0.2806 -10.302  < 2e-16
Dayday2:Steptd3  -0.1575     0.2492  -0.632  0.52739
Dayday3:Steptd3  -0.2689     0.2534  -1.061  0.28864
Dayday2:Steptd4  -0.5265     0.2783  -1.892  0.05853
Dayday3:Steptd4  -0.8667     0.2840  -3.052  0.00228

> tdMID.lmer3
Generalized linear mixed model fit using Laplace
Formula: Response ~ Bias + Day * Step + (1 + Day | Subject) 
   Data: E1tdMID
 Family: binomial(logit link)
  AIC  BIC logLik deviance
 3342 3439  -1655     3310
Random effects:
 Groups  Name        Variance Std.Dev. Corr          
 Subject (Intercept) 1.43175  1.19656                
         Dayday2     0.38259  0.61854  -0.741        
         Dayday3     0.54498  0.73823  -0.797  0.890 
number of obs: 3232, groups: Subject, 36

Estimated scale (compare to  1 )  0.9678673 

Fixed effects:
                Estimate Std. Error z value Pr(>|z|)
(Intercept)      1.43597    0.27779   5.169 2.35e-07
Biast           -0.74134    0.27934  -2.654  0.00796
Dayday2          0.28426    0.21591   1.317  0.18799
Dayday3          0.47782    0.22966   2.081  0.03747
Steptd3         -1.72670    0.18359  -9.405  < 2e-16
Steptd4         -2.87799    0.20556 -14.001  < 2e-16
Dayday2:Steptd3  0.03089    0.25417   0.122  0.90327
Dayday3:Steptd3 -0.02159    0.25688  -0.084  0.93302
Dayday2:Steptd4 -0.24109    0.28474  -0.847  0.39717
Dayday3:Steptd4 -0.49348    0.29032  -1.700  0.08917

> tdMID.lmer4
Generalized linear mixed model fit using Laplace
Formula: Response ~ Bias + Day * Step + (1 | Subject) 
   Data: E1tdMID
 Family: binomial(logit link)
  AIC  BIC logLik deviance
 3352 3419  -1665     3330
Random effects:
 Groups  Name        Variance Std.Dev.
 Subject (Intercept) 0.73927  0.8598
number of obs: 3232, groups: Subject, 36

Estimated scale (compare to  1 )  0.977563 

Fixed effects:
                Estimate Std. Error z value Pr(>|z|)
(Intercept)       1.3959     0.2437   5.728 1.01e-08
Biast            -0.8138     0.2999  -2.713  0.00666
Dayday2           0.3702     0.1834   2.018  0.04360
Dayday3           0.5967     0.1888   3.161  0.00157
Steptd3          -1.5705     0.1726  -9.101  < 2e-16
Steptd4          -2.6397     0.1911 -13.814  < 2e-16
Dayday2:Steptd3  -0.1374     0.2460  -0.559  0.57650
Dayday3:Steptd3  -0.2342     0.2498  -0.937  0.34861
Dayday2:Steptd4  -0.4955     0.2729  -1.816  0.06943
Dayday3:Steptd4  -0.8198     0.2784  -2.945  0.00323





More information about the R-lang mailing list