[R] mcl models, percentages

John Hendrickx john_hendrickx at yahoo.com
Wed May 14 22:58:31 CEST 2003


--- Thomas Lumley <tlumley at u.washington.edu> wrote:
> On Wed, 14 May 2003, John Hendrickx wrote:
> 
> >
> > A caveat is that "clogit" in R doesn't produce the same estimates
> as
> > "multilog", although the likelihood functions for both models are
> the
> > same. The maximum absolute difference is 0.0034, the mean
> absolute
> > difference is 0.00069. Stata's "clogit" and "mlogit" produce the
> same
> > estimates and match those of "multilog" to at least 6 decimal
> points
> > accuracy. See the notes in http://www.xs4all.nl/~jhckx/R/mcl.html
> Can
> > anyone shed any light on this?
> >
> 
> 
> Two possibilities
> 
> 1/ not having converged far enough: the convergence tolerance for
> coxph is
> by default only 1e-4 (yes, I should change it)
> 
> 2/ Weights. In one of your examples you have frequency weights
> passed to
> clogit.  This doesn't work (at least, it isn't equivalent to
> passing in
> the expanded data) because weighting doesn't make coxph compute the
> full
> set of permutations that you need for the likelihood in a large
> stratum.

It appears to be the convergence tolerance. It's not just the
weights, the problem occurs for the logan data as well. Specifying
"eps=1e-9" in  coxph produces the estimates found in other programs.
Could you specify a lower default value for eps? It would also be
useful to add options in "clogit" for eps and weights.

John Hendrickx




More information about the R-help mailing list