Standardising different response variables so I can compare effect sizes across response variables of different units

Viewed 37

I want to standardise the following four response variables. This is so I can compare the slopes across the different variables to see when in a birds reproductive cycle is environmental effect most impactful. After googling it seems that standardising response variables is not often done but are there are big issues with me doing so?

My predictor variable in this case is Native_biomass and I want to include numerous confounding variables such as Non_native_biomass + Distance_to_road + Distance_to_light + Anthropogenic_cover + Canopy_cover + Species

Responses:
Egg_lay_date
Clutch_size
Chick_size
Fledgling_success

To do this, would i be right to use the rstandard() function? I'm a little confused as to how whether getting the standardised residuals is the same as standardising my response variable.

I've tried standardising using the Egg_lay_date response to begin:

standardise.lm <- lm(Egg_lay_date ~ Native_biomass + Non_native_biomass + Distance_to_road + Distance_to_light + Anthropogenic_cover + Canopy_cover + Species, data=egglay_date_standard_test)

standard_res <- rstandard(standardise.lm)
egglay_date_standard_test <- cbind(egglay_date_standard_test, standard_res)
summary(egglay_date_standard_test)

It seems to have worked but just not sure if this is the same as standardising my response variable?

 summary(egglay_date_standard_test)
    Nest_box      First_egg     Total_biomass   Native_biomass  Non_native_biomass   Species           Occupied_YN
 Min.   : 6.0   Min.   : 9.00   Min.   :10.00   Min.   : 0.00   Min.   : 0.00      Length:16          Min.   :1   
 1st Qu.:26.5   1st Qu.:17.00   1st Qu.:30.00   1st Qu.:15.00   1st Qu.: 0.00      Class :character   1st Qu.:1   
 Median :46.0   Median :19.00   Median :41.25   Median :16.88   Median :21.25      Mode  :character   Median :1   
 Mean   :40.5   Mean   :22.81   Mean   :38.75   Mean   :21.48   Mean   :17.27                         Mean   :1   
 3rd Qu.:55.5   3rd Qu.:25.25   3rd Qu.:50.62   3rd Qu.:28.12   3rd Qu.:28.12                         3rd Qu.:1   
 Max.   :66.0   Max.   :58.00   Max.   :57.50   Max.   :52.50   Max.   :37.50                         Max.   :1   
  standard_res            
 Min.   :-1.92983    
 1st Qu.:-0.55444   
 Median :-0.31608   
 Mean   :-0.04515     
 3rd Qu.: 0.34137   
 Max.   : 2.41618    

Thank you in advance

1 Answers

Extracting standardized residuals is not the same as standardizing your response variables (standardized residuals adjust the residuals to account for the influence the corresponding observation has on the response). It won't change the regression coefficient, which is what you want to compare across models (if I understand correctly).

In base R, the scale() function is the easiest way to standardize variables (by default, it subtracts the mean and divides by the standard deviation).

lm(scale(Egg_lay_date) ~ ..., ...)

(where the first ... is the rest of your formula and the second ... is the other arguments to lm, such as data).

A reasonably efficient way to fit a bunch of scaled regressions would be (illustrating with the built-in mtcars data set):

lm0 <- lm(mpg ~ cyl + vs + am + gear, data = mtcars)
scaled_regs <- list(
    mpg = update(lm0, scale(mpg) ~ .),
    disp = update(lm0, scale(disp) ~ .),
    wt = update(lm0, scale(wt) ~ .)
)
scaled_regs[["mpg"]]

(You could automate this still further, at the cost of making it harder to understand ...)

If you want to compare across predictors as well as across responses you should also scale your predictor variables.

Related