フィルターのクリア

glfmfit logistic regression overparametrization issue

2 ビュー (過去 30 日間)
Al
Al 2016 年 12 月 8 日
Hello all,
I have a data-set with two categorical predictors (A and B) and one binary output C; therefore, I decided to use logistic regression.
Predictor A has nine possible variables Predictor B has sixteen possible variables
Each possible variable for each predictor has been used at least six times. There are 2002 observations, which each have a corresponding predictor A, B, and out C value.
Given that there are categorical variables, I have grouped them together using dummy variables. When the dummy variable matrix was input into glmfit, I removed a column of variables from the dummy variable matrix in order to account for the intercept.
Despite this, I still get the following response:
Warning: X is ill conditioned, or the model is overparameterized, and some coefficients are not identifiable. You should use caution in making predictions.
My code is as follows:
data=csvread('Iraq_Afghanistan_DATA_numeric_only.csv');
target = data(:,4);
perpetrator = data(:,5);
weapon= data(:,6);
tp=[target perpetrator];
ntp=dummyvar(tp);
ntp2=ntp(:,1:24);
[b,dev,stats] = glmfit(ntp2, nweapon','binomial','logit');
Thank you

回答 (0 件)

カテゴリ

Help Center および File ExchangeRegression についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by