nmrval returning larger matrix than expected.

조회 수: 1 (최근 30일)
Daniel Theobald
Daniel Theobald 2020년 5월 26일
댓글: Daniel Theobald 2020년 5월 26일
I've done a simple logstic regression for one predictor varilable (X) (a continuous set oberseved measruements) and one repsonse variable (Y) (fail or sucess taken for each oberserved measurement).
So without loads of detail, you can see this is a simple problem and the regression should take the form of
Why is it when i run mnrval(B,X) i get n-by-p+1 matrix back, instead of a n-by-p matrix?
Shouldn't nmrval(B,X) just return a 1 column vector for my problem as there is only only one predictor varible?
Thank you for you're help,
im very aware its likely a stupid question.

답변 (1개)

Steven Lord
Steven Lord 2020년 5월 26일
Does your X matrix contain a column of 1s? If so see the Note in the first item of the Description section on the documentation page for the mnrval function.
  댓글 수: 1
Daniel Theobald
Daniel Theobald 2020년 5월 26일
It is not a column of 1s, i did clock that in the documentation page.
It is actually a column of values between 0 and 1 (probabilities).
The weird thing is that if i add (:,1) and (:,2) i get exactly a soltuion of 1s.
This means that one column is prob and the other is prob-1, i just dont know which is which.
Strange right?
Thanks!

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

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by