Description Usage Arguments Value Examples

This function returns an estimated logit model.

1 2 |

`Z` |
dataset with dependent variable in the first column and explanatory variables in other columns. |

`method` |
either IWLS to estimate a glm by Iterated Weighted Least Squares, or GMM to estimate with method of moments. |

`start` |
starting values, defaults to vector of zeros for IWLS and |

`maximizer, ` |
maximizer used for GMM, either "nlminb" for port routines or "BFGS". |

`wmatrix` |
Defaults to "ident" for identity matrix weighting of the gmm estimator. Other option is "optimal" for inverse covariance weighting. See package "gmm" for details. |

`gmmtype, ` |
Either "twostep" for the two step GMM proposed by Hansen(1982), and the "cue" and "iterative" for respectively the continuously and the iteratively updated methods proposed by Hansen, Eaton et Yaron (1996). See package "gmm" for details. Defaults to "iterative". |

A logit model fitted by glm()

1 2 3 4 5 6 7 8 9 10 | ```
set.seed(10101)
Z <- simulateLogit(nobs=1000, pars =c(0.25,-0.5, 0.1, -0.1, 0, 0))
# Iterated Weighted Least Squares
test<- logit(Z)
# GMM using port routines and the results of the IWLS as starting values
test2<- logit(Z, method="gmm", start=coef(test))
# GMM using BFGS and starting at correct parameters
test3<- logit(Z, method="gmm", maximizer="BFGS", start =c(0, 0.25,-0.5, 0.1, -0.1, 0, 0))
test4<- logit(Z, method="gmm")
``` |

BPJandree/AutoGLM documentation built on Nov. 6, 2018, 10:43 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.