Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Binary logit regression

Subject: Binary logit regression

From: Victor

Date: 30 Jun, 2012 17:10:15

Message: 1 of 3

Good afternoon,

I am attempting to model sovereign default probabilities. To do so I have as dependant variable:
y=[0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1]
and four explanatory variables x1 x2 x3 and x4, all of same dimension.

Here are my issues:
1) Shall I regress first my explanatory variables against the variable Y (which is not in a binary form) from which I derived y? Or should I directly regress these explanatory variables against y?

If the second option is the right one, how do I do that?

2) I do not really know what are the steps I should follow then to obtain the probability of default, according to the variable that I will find significant.

Assuming x1 and x2 are significant, are the following steps correct?

X=[x1 x2]
[b,dev,stats] = glmfit(X,y,'binomial','link','logit')
yfit = glmval(b, X,'logit');

3) Finally, if the above steps are correct, among the outputs returned, which one would give me the probability of default?

Thanking you in advance for your help.

Victor

Subject: Binary logit regression

From: Greg Heath

Date: 1 Jul, 2012 05:25:24

Message: 2 of 3

On Jun 30, 1:10 pm, "Victor " <victorgen...@hotmail.fr> wrote:
> Good afternoon,
>
> I am attempting to model sovereign default probabilities. To do so I have as dependant variable:
> y=[0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1]
> and four explanatory variables x1 x2 x3 and x4, all of same dimension.
>
> Here are my issues:
> 1) Shall I regress first my explanatory variables against the variable Y (which is not in a binary form) from which I derived y? Or should I directly regress these explanatory variables against y?
>
> If the second option is the right one, how do I do that?
>
> 2) I do not really know what are the steps I should follow then to obtain the probability of default, according to the variable that I will find significant.
>
> Assuming x1 and x2 are significant, are the following steps correct?
>
> X=[x1 x2]
> [b,dev,stats] = glmfit(X,y,'binomial','link','logit')
> yfit = glmval(b, X,'logit');
>
> 3) Finally, if the above steps are correct, among the outputs returned, which one would give me the probability of default?

yfit.

help glmfit
doc glmfit

Hope this helps.

Greg

Subject: Binary logit regression

From: Victor

Date: 1 Jul, 2012 10:04:07

Message: 3 of 3

Hi Greg,

Thanks for your prompt answer. I unfortunately already read the matlab doc as well as other posts in matlab central but I am still not sure of what I have to do. If you could give me some advices regarding the above mentioned three steps, I would really appreciate.

Thanks again for your help.

Victor

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us