extracting standardized coefficients from lm in R

前端 未结 3 1718
Happy的楠姐
Happy的楠姐 2021-01-30 06:35

My apologies for the dumb question...but I can\'t seem to find a simple solution

I want to extract the standardized coefficients from a fitted linear model (in R) there

3条回答
  •  春和景丽
    2021-01-30 07:33

    Just use colnames(data) with lapply or sapply.
    For example:

    lapply(data[, colnames(data)], scale)
    

提交回复
热议问题