嗨我在r中使用coefplot函數來繪製廣義線性模型的係數。我想改變95%CI線的顏色與50%CI線的顏色不同。 95%和50%CI線的顏色參數默認爲相同的顏色。coefplot in R;改變CI線的顏色
coeff<-coefplot(model1,pointSize=5,color="black",fillColor="grey",lwdOuter = 1.2,lwdInner=2)
coeff + theme_bw() +
theme(panel.grid.major=element_blank(),panel.grid.minor=element_blank()) +
theme (axis.title.y = element_text(size=16)) +
theme(axis.title.x = element_text(size=16)) +
scale_y_discrete(name="",labels=c("NDAA","GAP","SS","PS","LL")) +
theme (axis.text.x = element_text(size=16)) +
theme(axis.text.x = element_text(size=16)) +
scale_x_continuous(name="Regression Estimate") +
labs(title = "") +
coord_flip()
另一點是使用'coefplot'輸出,而不是你自己的係數。 'mm < - coefplot(model1,plot = FALSE)'然後你使用''HighInner「,」LowInner「,」HighOuter'..'變量,也許你可以把它作爲練習。 – agstudy