[英]How can I graph to check in what way a significant predictor is effecting my outcome variable?
How can create a visual to see how time of day effected morality levels? 如何创建视觉效果来查看一天中的时间如何影响道德水平? time of day is a 1/2 variable and morality was measured by a scale. 一天中的时间是1/2变量,道德是通过量表衡量的。
Reg2<-lm(Morality~TimeofDay,data=Data316b)
summary(Reg2)
Call:
lm(formula = Morality ~ TimeofDay, data = Data316b)
Residuals:
Min 1Q Median 3Q Max
-1.43214 -0.48304 -0.06607 0.47589 1.21786
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.5500 0.1915 18.539 <2e-16 ***
TimeofDay 0.4821 0.1915 2.107 0.0418 *
Signif. codes: 0 ‘***' 0.001* * 0.01'*' 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.6633 on 38 degrees of freedom
(3 observations deleted due to missingness)
Multiple R-squared: 0.1046, Adjusted R-squared: 0.081
F-statistic: 4.438 on 1 and 38 DF, p-value: 0.04181
I think you want 我想你要
plot(Morality~TimeofDay,data=Data316b)
Reg2 <- lm(Morality~TimeofDay,data=Data316b) summary(Reg2)
abline(Reg2)
or: 要么:
library("ggplot2")
ggplot(Data316b,aes(TimeofDay,Morality))+
geom_point() + geom_smooth(method="lm")
PS are you really measuring morality [sic] as a function of time-of-day, or is it mortality that's changing?? PS:您是否真的根据一天中的时间来衡量道德[原文如此],还是死亡率正在改变?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.