From: <johnson4_at_babel.ling.upenn.edu>

Date: Sun, 02 Mar 2008 03:38:08 -0500

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 Sun 02 Mar 2008 - 08:40:43 GMT

Date: Sun, 02 Mar 2008 03:38:08 -0500

Quoting Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>:

> anova (anova.Design) computes Wald statistics. When the log-likelihood

*> is very quadratic, these statistics will be very close to log-likelihood
**> ratio chi-square statistics. In general LR chi-square tests are better;
**> we use Wald tests for speed. It's best to take the time and do
**> lrtest(fit1,fit2) in Design, where one of the two fits is a subset of
**> the other.
**>
**> Frank Harrell
*

Thanks, this is great, but in my case, there's just one factor,

fit1 <- lrm(outcome~factor,data)

and I'm having trouble constructing the subset 'null model', as e.g.

fit2 <- lrm(outcome~1,data)

returns an error message.

How do I construct a null model with lrm() so that I can use lrtest() to test a model with only one predictor?

I apologize for asking what must be a very simple question but I have been unable to find the answer by searching R-help.

Thanks,

Dan

P.S. Second point: I have another case where I use lmer(), and there the null model includes a random effect so I don't get the problem above. It looks like with lmer objects anova() uses LLR, not Wald. Is that right?

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 Sun 02 Mar 2008 - 08:40:43 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 02 Mar 2008 - 15:30:18 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.
*