Hi,

Recently, I posted here regarding a logistic regression model.

I end up with two models (time as non-interaction and as interaction).  By looking at the model comparison results, it seems like the interaction model is more logical to select. 
The results are below:
> anova(fm2,fm3TasFE)
Data: Behavdat2
Models:
fm2: Response3 ~ Wavelength * Start_Resp + (1 | Subject) + Time + 
fm2:     (0 + Time | Subject) + (1 | resid)
fm3TasFE: Response3 ~ Wavelength * Start_Resp * Time + (1 | Subject) + 
fm3TasFE:     (0 + Time | Subject) + (1 | resid)
         Df    AIC    BIC  logLik  Chisq Chi Df Pr(>Chisq)   
fm2      21 802.57 885.96 -380.28                            
fm3TasFE 36 800.88 943.85 -364.44 31.685     15   0.007105 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 


The main effect of time is not significant.  But, I want to keep it in the model as a fixed effect to measure the differences in simple effect means of response at different time levels for factors Wavelength and Start_Resp.  Does it make sense to keep time?   

I also have a doubt to calculate the residuals for logistic regression model as it is not shown in the results.

Random effects:
 Groups  Name        Variance  Std.Dev. Corr              
 resid   (Intercept) 11.732673 3.42530                    
 Subject Time5        0.094953 0.30814                    
         Time10       0.073174 0.27051  0.264             
         Time15       0.100639 0.31724  0.141 0.189       
         Time20       0.243607 0.49357  0.077 0.071 0.190 
 Subject (Intercept)  2.114694 1.45420  

I got the code for boxplot from the archives.

ilog = function(x) { 1/(1 + exp(-x)) }
boxplot(ilog(fitted(fm3TasFE)) ~ Response3, data = Behavdat2)
Are there any other ways to calculate residuals?

Thanks.
AK         
	[[alternative HTML version deleted]]

