0
下面是我的数据框中用于此绘图的数据的子集;ggplot印刷回归方程,其中在一个绘图上有多个lm
Year region gear Species.Code query LPUE
1974 Cyprus creel LOB Pre 0.31
1975 Cyprus creel LOB Pre 0.26
1976 Cyprus creel LOB Pre 0.33
1977 Cyprus creel LOB Pre 0.17
1978 Cyprus creel LOB Pre 0.2
1979 Cyprus creel LOB Pre 0.22
1980 Cyprus creel LOB Pre 0.38
1981 Cyprus creel LOB Pre 0.51
1982 Cyprus creel LOB Pre 0.57
1983 Cyprus creel LOB Pre 0.45
1984 Cyprus creel LOB Post 0.43
1985 Cyprus creel LOB Post 0.33
1986 Cyprus creel LOB Post 0.21
1987 Cyprus creel LOB Post 0.69
1988 Cyprus creel LOB Post 0.65
1989 Cyprus creel LOB Post 0.37
1990 Cyprus creel LOB Post 0.35
1991 Cyprus creel LOB Post 0.15
1992 Cyprus creel LOB Post 0.21
1993 Cyprus creel LOB Post 0.17
我已生成的时间序列数据的线图和装配两个线性回归一个用于数据高达1984,一个用于数据1984 使用以下代码之后;
ggplot(subset(A7,region=="Cyprus"&gear=="creel"&Species.Code=="LOB"),aes(x=Year,y=LPUE,shape=query))+
geom_line()+
geom_smooth(method="lm")+
theme(panel.background = element_rect(fill = 'white', colour = 'black'))
我想先知道我可以打印在图上方程(其他例子我已经在堆栈溢出只发现了一个LM处理),其次我怎么可以保存LM模型,这样我可以对它们之间的重要性进行统计检验。
你拥有的屏幕截图会有所帮助,因为你可能没有包含足够的数据来重现你拥有的内容。 –
如果你想做统计测试,我建议适合ggplot以外的模型。 – Roland
对不起@MikeWise我不熟悉如何添加屏幕截图。我只能看到如何从互联网上添加图片。 –