[R-sig-ME] Scaling Issues

Stephanie Rivest @r|ve046 @end|ng |rom uott@w@@c@
Wed Jul 17 22:44:52 CEST 2019


My name is Stephanie Rivest and I've emailed this list in the past asking
questions about glmer models. I'm sorry if this is a repetitive question
that has perhaps been asked in the past, but I have not yet been able to
find an explanation on the web.

I'm using lme4 (glmer.nb) to fit a mixed effects model with the negative
binomial family. I have 173 data points, 8 independent parameters, and 1
random effect. My model is having difficulty converging and I think part of
the problem may be scaling (given the type of warnings that I get). I've
done some research on the subject and have found a couple links (
discussing what to do. In these web links, B. Bolker suggests the following
code to centre and scale predictors...

B. Bolker's Code:

numcols <- grep("^c\\.",names(df))
dfs <- df
dfs[,numcols] <- scale(dfs[,numcols])
m4 <- update(m1,data=dfs)

My questions is, what is this code doing!? When I look at the new df, it
seems completely identical to the old df, like nothing has changed. And
yet, when I fit the model with the new df, the warnings mostly go away
suggesting that whatever I did seemed to work. I would really like to
understand what is actually going on in the code above. Have all columns
been changed? Or only certain ones? Have scales actually been changed? If
so, in what way? Do they need to be backtransformed in order for me to do
my model interpretation at the end?

Thank you so much for your time,

Stephanie Rivest
Ph.D. Candidate | Candidate au Doctorat
Dept. of Biology | Dép. de Biologie
University of Ottawa | Université d'Ottawa

	[[alternative HTML version deleted]]

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