Hello, 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 ( https://stackoverflow.com/questions/23478792/warning-messages-when-trying-to-run-glmer-in-r AND https://rstudio-pubs-static.s3.amazonaws.com/33653_57fc7b8e5d484c909b615d8633c01d51.html) 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 Stephanie Rivest Ph.D. Candidate | Candidate au Doctorat Dept. of Biology | D?p. de Biologie University of Ottawa | Universit? d'Ottawa
Scaling Issues
1 message · Stephanie Rivest