概率回归中的预测和乘法变量/交互项 [英] predict and multiplicative variables / interaction terms in probit regressions

查看:189
本文介绍了概率回归中的预测和乘法变量/交互项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想确定概率回归中每个因变量的边际效应,如下所示:

I want to determine the marginal effects of each dependent variable in a probit regression as follows:

  • 使用每个变量的平均值预测(基本)概率
  • 对于每个变量,如果变量取均值+变量的1x标准偏差值,则预测与基本概率相比的概率变化

在我的回归之一中,我有一个乘法变量,如下所示:

In one of my regressions, I have a multiplicative variable, as follows:

my_probit <- glm(a ~ b + c + I(b*c), family = binomial(link = "probit"), data=data)

两个问题:

  1. 当我使用上述方法确定边际效应时,乘项的值是否将取均值+变量的1x标准偏差来反映b或c的值?
  2. 相同的问题,但是有一个交互项(*,没有I()),而不是乘法项.

非常感谢

推荐答案

当解释涉及交互项的模型的结果时,一般规则是不要解释系数.相互作用的存在意味着术语系数的含义将根据用于预测的其他变量值而变化.查看结果的正确方法是构建预测网格",即在感兴趣的范围内(希望在数据支持范围内)隔开的一组值.此过程的两个基本功能是expand.gridpredict.

When interpreting the results of models involving interaction terms, the general rule is DO NOT interpret coefficients. The very presence of interactions means that the meaning of coefficients for terms will vary depending on the other variate values being used for prediction. The right way to go about looking at the results is to construct a "prediction grid", i.e. a set of values that are spaced across the range of interest (hopefully within the domain of data support). The two essential functions for this process are expand.grid and predict.

dgrid <- expand.grid(b=fivenum(data$b)[2:4], c=fivenum(data$c)[2:4]
# A grid with the upper and lower hinges and the medians for `a` and `b`.

predict(my_probit,  newdata=dgrid)

您可能希望将预测的标度设置为默认值以外的其他值(这将返回线性预测值),因此如果满足以下条件,则可能会更容易理解

You may want to have the predictions on a scale other than the default (which is to return the linear predictor), so perhaps this would be easier to interpret if it were:

predict(my_probit,  newdata=dgrid, type ="response")

请务必阅读?predict?predict.glm并使用一些简单的示例来确保您获得了预期的结果.

Be sure to read ?predict and ?predict.glm and work with some simple examples to make sure you are getting what you intended.

来自包含相互作用的模型(至少涉及2个协变量的模型)的预测应该被认为是三维的曲面或二维流形. (并且对于3个协变量交互为等值包络.)非交互模型可以分解为单独的术语效果"的原因是,平面预测表面的斜率在所有输入水平上都保持恒定.交互不是这种情况,尤其是那些具有乘法和非线性模型结构的交互.在微分方程课程中获得的图形工具和见解可以在这里得到有效的应用.

Predictions from models containing interactions (at least those involving 2 covariates) should be thought of as being surfaces or 2-d manifolds in three dimensions. (And for 3-covariate interactions as being iso-value envelopes.) The reason that non-interaction models can be decomposed into separate term "effects" is that the slopes of the planar prediction surfaces remain constant across all levels of input. Such is not the case with interactions, especially those with multiplicative and non-linear model structures. The graphical tools and insights that one picks up in a differential equations course can be productively applied here.

这篇关于概率回归中的预测和乘法变量/交互项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆