[R-sig-ME] Predictor standardized transformation in GLMM

Di Zeng zengd|@eed @end|ng |rom gm@||@com
Fri Oct 22 03:32:00 CEST 2021


Dear all,

My colleagues and I have a question when we use the generalized linear
mixed models to analyze our data:

# Creating an example dataset

group <- factor(c('A','A','A','B','B','C','D'))#Random effects
y <- c(1:7)
x1 <- c(6,6,6,5,5,4,3)
x2 <- c(11,11,11,5,5,6,8)


Because the predictors (x1, x2) have different units, we need to
standardize them before running our models. There are two ways to conduct
this standardized transformation.

First, standardizing x1, x2 directly, like:

scale(dt$x1)
scale(dt$x2)

Second, standardizing x1, x2 based on unique group, like:

scale(unique(dt$x1))
scale(unique(dt$x2))


We wonder which way is reasonable? In my own idea, we should use the second
one. Because data points in the same group are non-independent replication
in read dataset.

Could you mind giving us some suggestions or ideas on this problem?

Thanks very much,

Di

	[[alternative HTML version deleted]]



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