Standardisation in MuMIn package in R

孤街醉人 提交于 2020-01-04 14:30:09

问题


I am using the 'MuMIn' package in R to select models and calculate effect sizes of the input variables (rain, brk, onset, wid). To make my effect size comparable between variables, I standardised them using standardize function in arm package. Here is the code that I am following:

For reference, please refer to the appendix of this paper: http://onlinelibrary.wiley.com/doi/10.1111/j.1420-9101.2010.02210.x/full Grueber et al. 2011: Multimodel inference in ecology and evolution: challenges and solutions

data1<-read.csv("data.csv",header=TRUE)       #reads the data

global.model<-lmer(yld.res ~ rain + brk + onset + wid + (1|state),data=data1,REML="FALSE")               # prepares a global model

stdz.model <- standardize(global.model,standardize.y = FALSE)          # standardise the input varaibles 

model.set <- dredge(stdz.model)      ### generates the full submodel set

top.models <- get.models(model.set, subset= delta<2)   # selects models with delta AIC <2

model.avg(top.models)       # calculates the average effect size of input variables

Here is the result of model.avg(top.models) which gives the average effect size of each input variable

Coefficients: 
         (Intercept)     brk         rain         wid        onset
subset -4.281975e-14   -106.0919   51.54688    39.82837    35.68766

I read around how the standardize function works- subtracts mean and divides by 2SD.

My question is this: Since I have standardised the input variables, should not the effect sizes be between -1 to 1? or the effect size which the output shows is correct?

Please advise

Thanks a lot


回答1:


This is more of a statistical question than a programming question, but: you've only standardized the predictor variables, not the response variable (you specified standardize.y=FALSE); therefore, each of your coefficients represents the expected change of the response (in the response's units!) per 2 SD change in the predictor. If the range of the response is large (as it must be in your example), then there could be a very large change. For example, if I were analyzing the change in elephant weight measured in milligrams, I could expect very large changes in the response for reasonably small changes in the predictors (e.g. sex, age, food availability). You should probably use standardize.y=TRUE if you want truly nondimensional/unitless effect sizes. Even nondimensional effects aren't necessarily constrained to be between -1 and +1, but it would be surprising for them to be so large.

By the way, I think your standardize function comes from the arm package, not from MuMIn (library("sos"); findFn("standardize",sortby="Function)).



来源:https://stackoverflow.com/questions/25059697/standardisation-in-mumin-package-in-r

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!