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我不熟悉如何添加屏幕截圖。我只能看到如何從互聯網上添加圖片。 –