필터 지우기
필터 지우기

I have one binary response variable and 5 nominal predictor variables which take values (strongly agree, agree, neutral, disagree, strongly disagree). I want to obtain coefficient matrix using logistic regression. Please help.

조회 수: 1 (최근 30일)
Y = [0 1 0 1 1 1 ..] X = [var1 var2 var3 var4 var5] var1 = [agree neutral disagree ...] similarly var 2 var 3 var4 var5 I converted responses to -2 -1 0 1 2 as strongle disagree, disagree, neutral etc. now,I ran: [b,dev,stats] = glmfit(X,Y,'binomial','link','logit') I am getting error as: Y must be a two column matrix or a vector for the binomial distribution.

채택된 답변

Tom Lane
Tom Lane 2013년 4월 9일
Make sure Y and var1,...var5 are column vectors.
  댓글 수: 3
jacksparrow
jacksparrow 2013년 4월 11일
Would you be kind enough to provide me with a link to understand the stats matrix parameters to help me validate the results of my analysis.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by