【发布时间】:2017-11-07 00:08:12
【问题描述】:
我正在评估数值确定性模型的性能,并根据观察到的数据评估其预测性能。我制作了观察 (Vsurface) 与建模 (Vmod) 数据的散点图,拟合 lm(红线),并添加了 1:1 线。我想找到这两条线相交的点,这样我就可以记录模型从过度预测到预测不足的转变。是否有捷径可寻?这是lm的代码:
lm <- lm(Vmod~Vsurface, data = v)
summary(lm)
Call:
lm(formula = Vmod ~ Vsurface, data = v)
Residuals:
Min 1Q Median 3Q Max
-0.63267 -0.11995 -0.03618 0.13816 0.60314
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.20666 0.06087 3.395 0.00185 **
Vsurface 0.43721 0.06415 6.816 1.05e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2232 on 32 degrees of freedom
Multiple R-squared: 0.5921, Adjusted R-squared: 0.5794
F-statistic: 46.45 on 1 and 32 DF, p-value: 1.047e-07
这是剧情代码:
ggplot(data = v, aes(x = Vsurface, y = Vmod)) +
geom_point(col = "slateblue2") +
geom_smooth(method = "lm", col = "red") +
geom_abline(intercept = 0, slope = 1)
我正在使用 R markdown。
【问题讨论】:
-
分析解决这个问题。
0.43721*x+0.20666 = x所以x = 0.20666/(1-0.43721) = 0.3672062