Skip to content
Back to formatted view

Raw Message

Message-ID: <CAOtvA4td_=VyD1YtWkf_56-_LAvR2uK8kGmKjejro4AJyGze5A@mail.gmail.com>
Date: 2021-10-22T01:32:00Z
From: Di Zeng
Subject: Predictor standardized transformation in GLMM

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]]