If you mean logistic regression, for example, along the lines of
$Y_i\sim\text{Bernoulli}(1,p_i)\,$, with
$\text{logit}(p_i) = X\beta\,$,
(equivalently, $P[Y_i=1] = \frac{\exp(X\beta)}{1+\exp(X\beta)},$)
then use glm
. For example:
glm(y~x1+x2,family=binomial)
There are examples in the help at ?glm.predict
, ?infert
and ?esoph
.
If you mean fitting a logistic curve via least squares, like
$E(Y) = \alpha \cdot(\frac{\exp(\beta_0+\beta_1 x)}{1+\exp(\beta_0+\beta_1 x)})$
then use nls
. There's an example of fitting a logistic function in the help at ?nls
.
Both are part of the standard R installation.
If you mean something else, you need to clarify what you want.
I see from this answer that apparently economists use 'fixed effect model' to refer to a conditional logit model, even though it's far from the only fixed effect model involving a logit. Who would have thought.
As ndoogan mentions in one of the other answers, there's a conditional logistic regression model (clogit
) in the survival
package.