I've put two packages for R on my home page at http://www.xs4all.nl/~jhckx/R/. The "pcnt" package is for multiway percentage tables. I've posted a first effort called "ctab" on this group and a request for enhancing "ftable" with percentages on the wishlist. The "mcl" package is for estimating multinomial logistic models using conditional logistic regression. This gives greater flexibility in imposing restrictions on the dependent variable. One application is to estimate loglinear models for sqaure tables (e.g. quasi-independence, quasi-symmetry) with covariates. The mcl package therefore contains a number of functions for models for square tables as well. 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? John Hendrickx
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. -thomas