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 で Gaussian Process Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!