[R-sig-ME] Dealing with heteroscedasticity in a GLM/M

Markus Jäntti markus.jantti at iki.fi
Thu Aug 23 09:29:57 CEST 2012


This is, strictly speaking, the wrong approach, but in order to explore the 
presence of heteroscedasticity, you could try to use the linear ME functions and 
the variance objects in that.

What I suggest by way of exploration is the following. If you regress a binomial 
response as if it were a countinuous variable in a standard OLS regression 
setting many problems arise,  including out of unit interval predictions and the 
error term is heteroscedastic. That heteroscedasticity is of a known form 
however, the variance being p*(1-p) where p is x*b is the linear predictor of 
the probability.

I would suggest you compare two models, both estimated using lme in the nlme 
package. One which models the response and includes a variance function that 
takes into account the heteroscedasticity induced by having a binary rather than 
continuous dependent variable. You then compare that with a model that adds, 
using the varComb() function, the heteroscedasticity you worry about.

Markus

On 08/23/2012 07:58 AM, Leila Brook wrote:
> I am hoping to find a way to account for heterogeneity of variance between categories of explanatory variables in a generalised model.
>
> I have searched books and this forum, and haven't found any advice that I understood could help account for this assumption in a generalised model context, as I can't fit a variance structure in lme4.
>
>
>
> As background to my study:
>
> I used camera stations set up in pairs (one positioned on a track and one off the track) to record my study species, and used the same pairs in each of two seasons. As my surveys were repeated, I have specified camera pair as a random effect. I am using a binomial model in lme4 to model the proportion of nights an animal was recorded, as a function of the fixed effects of season (2 categories), position (categorical: whether on or off the track), area (categorical: one of two areas) and continuous habitat variables, plus interactions between them.
>
>
>
> I validated the GLM form of the model, including plotting the deviance residuals against my explanatory variables, and have noted that the variance of residuals for the categorical variables appears to differ.
>
> Differences in the response variable between these categories were part of my research question and are evident in the raw data, so I don't want to remove them from the analysis.
>
> I have tried converting my response variable to be continuous, but when I do, it is not normal (too many zeros), nor is the log transformed variable.
>
>
>
> I have read that nlme can fit a variance structure to a LME, but haven't heard of a way of dealing with heterogeneity in a generalised mixed effect model, nor found an R package that can fit a variance structure to a GLMM.
>
> Can anyone provide any advice on how to overcome this problem, or whether I can continue, with some form of caveat, with the GLMM?
>
>
>
> Thanks in advance,
>
> Leila
>
>
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>


-- 
Markus Jantti
Professor of Economics
Swedish Institute for Social Research
Stockholm University



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