我试图减少数据的偏度和峰度,所以我进行了对数转换。但是,日志转换后显示“错误:C堆栈使用量7970592太接近限制”。
这是我的代码:
library(moments)
nps_post_visit <- na.omit(nps_post_visit)
nps_post <- nps_post_visit$post
nps_visit <- nps_post_visit$visit
kurtosis(nps_post,na.rm=T)
skewness(nps_post,na.rm=T)
kurtosis(nps_visit,na.rm=T)
skewness(nps_visit,na.rm=T)
log.nps_post_visit <-log(1+nps_post_visit[,3:4])
log.nps_post_visit <- as.data.frame(t(log.nps_post_visit)) # Set transformed data as data.frame
newnps_post <- log.nps_post_visit$post
newnps_visit <- log.nps_post_visit$visit
kurtosis(newnps_post,na.rm=T)
skewness(newnps_post,na.rm=T)
kurtosis(newnps_visit,na.rm=T)
skewness(newnps_visit,na.rm=T)