全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
2649 0
2016-07-21

请问高手,下列R code 是什么意思

getLMOutFunc = function(lmOut){

               highSEL= coef(lmOut)[,"Estimate"][["(Intercept)"]] +coef(lmOut)[,"Estimate"][["pred"]]

               lowSEL =coef(lmOut)[,"Estimate"][["(Intercept)"]] -coef(lmOut)[,"Estimate"][["pred"]]

               sampleN= as.numeric(lmOut[["ngrps"]])

               if(coef(lmOut)[row.names(coef(lmOut))=="pred",][[4]]<.05){

                              sig=       coef(lmOut)[row.names(coef(lmOut))=="pred",][[4]]

               } else {

                              sig=       "ns"

               }

               return(list("HighSEL" = highSEL, "Low SEL" = lowSEL, "Sig" = sig,"N" = sampleN))

}


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群