Re: [R] Different standard errors from R and other software

From: Joris Meys <jorismeys_at_gmail.com>
Date: Sun, 27 Jun 2010 01:22:54 +0200

If I understand correctly from their website, "discrete choice" models are mostly generalized linear models with the common link functions for discrete data? Apart from a few names I didn't recognize, all analyses seem quite "standard" to me. So I wonder why you would write the log-likelihood yourself for techniques that are implemented in R.

Unless I missed something pretty important, or you want to do a specific analysis that wasn't clear to me, you should take a closer look at the possibilities in R for generalized linear (mixed) modelling and so on.

Binary choice translates to a simple glm with a logit function. Multinomial choice can be done with eg. multinom() from nnet. Ordered choice can be done with polr() from the MASS package. A nice one to look at is the package mgcv or gamm4 in case of big datasets. They offer very flexible models that can include random terms, specific variance-covariance structures and non-linear relations in the form of splines.

Apologies if this is all obvious and known to you. In that case you might want to specify what exactly it is you are comparing and how exactly you calculated it yourself.

Cheers
Joris

On Fri, Jun 25, 2010 at 11:47 PM, Min Chen <chenmin0905_at_gmail.com> wrote:
> Hi all,
>
>    Sorry to bother you. I'm estimating a discrete choice model in R using
> the maxBFGS command. Since I wrote the log-likelihood myself, in order to
> double check, I run the same model in Limdep. It turns out that the
> coefficient estimates are quite close; however, the standard errors are very
> different. I also computed the hessian and outer product of the gradients in
> R using the numDeriv package, but the results are still very different from
> those in Limdep. Is it the routine to compute the inverse hessian that
> causes the difference? Thank you very much!
>
>     Best wishes.
>
>
> Min
>
>
> --
> Min Chen
> Ph.D. Candidate
> Department of Agricultural, Food, and Resource Economics
> 125 Cook Hall
> Michigan State University
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Joris.Meys_at_Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Sat 26 Jun 2010 - 23:26:53 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 27 Jun 2010 - 00:40:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive