【发布时间】:2019-07-08 14:10:58
【问题描述】:
我有以下 glm 回归:
fitglm= glm(Resp ~ Doses*Seasons, data=DataJenipa,family=binomial(link =
"probit"))
总结如下:
Call:
glm(formula = Resp ~ Doses * Seasons, family = binomial(link = "probit"),
data = DataJenipa)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.6511 -0.4289 -0.3035 -0.3035 2.6079
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.63423 0.26604 -2.384 0.0171 *
Doses -0.23989 0.09339 -2.569 0.0102 *
Seasons2 -1.06117 0.44979 -2.359 0.0183 *
Doses:Seasons2 0.23989 0.14380 1.668 0.0953 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 208.05 on 399 degrees of freedom
Residual deviance: 195.71 on 396 degrees of freedom
AIC: 203.71
为了可视化我的模型,我使用了 interact_plot(来自 jtools 包)
interact_plot(fitglm, pred = Doses, modx = Seasons, plot.points = T, point.shape = T,interval = F,modx.labels = c("Summer", "Winter"), line.thickness = 1.5)
我得到以下信息:
如何从上面的两行得到我的两个数学方程? (如:Summer(Y) = -0.63423 -0.23989x ... 并继续)
我知道我的例子是错误的,但是我如何从图中得到这两个方程??
【问题讨论】:
-
您应该按照此处答案中给出的步骤操作:stackoverflow.com/questions/24173468/…
-
这不是我的问题,我需要知道每条线的系数在哪里,因为 interact_plot 从单个 glm 模型(带有交互)创建了两条线
标签: r