stepwiseglm modelspec specified as 'linear' but behaving like 'interactions'
显示 更早的评论
I have a binary response vector y (N x 1) and a real-valued matrix X (N x t) of predictors. I want to estimate y with logistic regression via a stepping procedure. I'm executing the following statement:
stepwiseglm(X,y,'linear','distribution','binomial')
but the behavior seems more to follow the 'interactions' modelspec rather than the 'linear' that I've specified. For example, the function gives me the generalized linear regression model:
logit(y) ~ 1 + x3 + x1*x2
that is, it's testing products of individual predictors in the stepping procedure. The modelspec states that 'linear' means: "Model contains an intercept and linear terms for each predictor", while 'interactions' means "Model contains an intercept, linear terms for each predictor, and all products of pairs of distinct predictors (no squared terms)."
So it seems that either I'm doing something dumb, which has high probability, or stepwiseglm is behaving oddly and applying the 'interactions' modelspec instead of 'linear'. Any feedback would be appreciated.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Generalized Linear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!