摘要
为利用R语言实现Johnson-Neyman分析,本文首先利用car程序包对回归模型进行诊断,利用ggplot2程序包绘制散点图并添加拟合直线,然后利用interactions程序包进行Johnson-Neyman分析,结果显示interactions程序包能够正确计算两组连续型因变量间差异有统计学意义时的协变量的取值范围并画出Johnson-Neyman图。R语言是实现Johnson-Neyman分析的有效工具,并且在绘图上具有优势,功能强大。
To implement the Johnson-Neyman analysis in R,the car package was used to diagnose the regression model firstly,the ggplot2 package was used to draw scatter diagram and add fitting straight-line,the interactions package was used to conduct Johnson-Neyman analysis.The results showed that the interactions package can correctly calculate the value range of covariate when two continuous dependent variables have a significant difference and draw Johnson-Neyman plot.R programmer is a powerful tool to implement Johnson-Neyman analysis,and has advantages in plotting.
作者
高启胜
GAO Qi-sheng(School of Public Health,HangZhou Medical College,Hangzhou,Zhejiang 310053 China)
出处
《软件》
2019年第12期21-24,共4页
Software
基金
浙江省软科学研究计划(项目编号:2019C35023)