Logistic regression: Interpretation of stats

Hi,
I have performed a binary logistic regression with one predictor variable using mnrfit. Now using
[b,dev,stats] = mnrfit(x,y);
and looking at the stats I am wondering how to interpret them. I am pretty new to statistical analysis so this might be a stupid question: Why are there two values for a lot of the measures? Which of the two p-values do I interpret?
Thanks in advance for your tipps!

1 Kommentar

i am using mnrfit for logistic regression where x is matrix 12x200 the vector of x is dummy and y is dicotomic. iI should use other than writing mnrfit(x,y)? because I get very high p values. or maybe I should write the x in some particular way

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Adam Danz
Adam Danz am 26 Mär. 2019
Bearbeitet: Adam Danz am 26 Mär. 2019

0 Stimmen

Since the 'model' parameter isn't specified in your call to mnrfit(), I'm assuming your working with nominal responses which is the default model. That matters because the 'Interaction' parameter is not specified and it's default value for nominal models is 'on' (for orginal models it's 'off').
So, since you're working with an interaction term, then your beta coefficients should be a matrix of size [p+1 x k-1] where p is the number of predictors and k is the number of categories. As explained in the documentation (<-- read that), each column corresponds to the estimated intercept and predictor coefficients (in the order) and each row corrsponds to the multinomial categories.
So if you have a column of betas [1; 2; -3; -4], your model would be = 1 + 2X1 - 3X2 - 4X3
The stats output contains data in the same order. For example, stats.p are the p values for each beta value.
For more information of the stats output:

5 Kommentare

Pauli
Pauli am 26 Mär. 2019
Okay, but what do the two p values tell me? Whether the effect of the predictor on the category (or the respective coefficient) is significant?
I guess I'm having trouble understanding what the coefficients actually tell me..
Adam Danz
Adam Danz am 26 Mär. 2019
I think it would be helpful to go through the first example provided within the documentation.
The coefficients express both the effects of the predictor variables on the response categories and the log odds of being in one category versus the reference category. The p value is a measure of the significance of the effect. You could have a strong effect (high coeficient values) but not significant (p>0.05) or you could have a weak effect that is highly significant (p<0.001).
Pauli
Pauli am 27 Mär. 2019
In the example, the categories in the response variable are ordered in a way that it is clear which one matlab uses as the reference category. However, my data is no ordered this way. It's basically a column of zeros and ones. If it starts with 1 0, for example, does matlab take 0 as the reference category?
Also, which p-value do I interpret then?
Adam Danz
Adam Danz am 27 Mär. 2019
If it starts with 1 0, for example, does matlab take 0 as the reference category?
That's a good question and isn't addressed in the documentation for mnrfit(). You could test it by running the function with your categories starting with 1 and again with 0 to see if the coeficients change. My guess is that the categories are the same as if you were to run findgroups().
Also, which p-value do I interpret then?
The p vals and the rest of the stats always correspond to the the betas in the same order as the output.
Pauli
Pauli am 28 Mär. 2019
Okay, I think I found that 1 is my reference category (1 refers to a performance of 100%, 0 to 0%). A high performance is actually what I'm interested in (so 1) and what I'm plotting later. Wouldn't it make sense to have 0 as my reference category then? Is it possible to change that?
In the stats I get the betas [-0.3661; 0.0258]. Could you give me an example sentence of what those values tell me? I find the info in the example to be quite abstract.

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 26 Mär. 2019

Community Treasure Hunt

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

Start Hunting!

Translated by