# Logistic Regression - Equation

#### bizzzar

##### New Member
Hi!

I run a logistic regression, and i know that it can be written as
Pr(y=1)=F(a+b_1*x+b_2*z).

With y being the dependent variable, a the intercept, b_ the coefficients and x&z the independent variables.
Concerning the notation only: Any ideas how I could write this for x and z being not single variables but containing multiple variables AND the logistic model being not cross-sectional but a fixed-effects (panel) model?

#### JesperHP

##### TS Contributor
The logistic regression could more precisely be written as:
$$P (y_i = 1 \lvert x_i, \beta) = F(x_i^T \beta)$$ where x_i^T is a row vector for individual i with one coordinate for each independent variable and one for the constantterm.

A fixed effect model can be written as:
$$y_{it} = \alpha_i + x_{it}^T \beta + u_{it}$$ so I guess you just change what you condition on and write:

$$P (y_{it} = 1 \lvert x_{it}, \alpha_i ,\beta) = F(\alpha_i + x_{it}^T \beta)$$

Last edited:

#### bizzzar

##### New Member
Thanks for your help JesperHP!! I am not that familiar with econometrics and you really helped me out here.

I get the gist of the equations and I do understand that alpha does not come with time index to account for the time-invariant effect of an individual i. For me there are two questions left

1) Since you use the same notation for the cross-sectional and the fixed-effects equation, I am wondering whether the beta-vector in the FE-logit contains the intercept as in the cross-sectional case!? As far as I have understood the concept of fixed-effects, I would have expected that there is no longer any individual-independent intercept.

2) In the FE-Logit-Framework: Suppose I was only interested in the effect of one individual variable and include a set of control variables to account for composition effects. Is there any way I could highlight this in an equation?

Thank you so much!

#### JesperHP

##### TS Contributor
In answer to 1) you are right, my mistake - I shouldn't have written "and one for the constantterm" since there is none contained in the betavector.

2) I would write $$P(y_{it} = 1 \lvert z_{it}, x_{it},\alpha_i,\beta,\theta) = F(\alpha_i + z_{it}\beta + x_{it}^T \theta)$$ with z being th variable of interest....and

perhaps write this once and explicitly say that I was using supression writing only the variable of interest $$F(\alpha_i + z_{it}\beta + x_{it}^T \theta) \equiv G(\alpha_i + z_{it}\beta )$$. Choice of values for the other values should then be clear from index on z or from context if you for som reason decide to try out values not determined by datamatrix.

Last edited:

#### bizzzar

##### New Member
Thanks for your help JesperHP !!!