From: <johnson4_at_babel.ling.upenn.edu>

Date: Sat, 01 Mar 2008 21:00:59 -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 - 02:04:03 GMT

Date: Sat, 01 Mar 2008 21:00:59 -0500

I am running lrm() with a single factor. I then run anova() on the fitted
model to obtain a p-value associated with having that factor in the model.

prob_a <- inv.logit(rnorm(1,0,1))

prob_b <- inv.logit(rnorm(1,0,1))

data <- data.frame(

factor=c(rep("a",500),rep("b",500)),

outcome=c(sample(c(1,0),100,replace=T,prob=c(prob_a,1-prob_a)),

sample(c(1,0),100,replace=T,prob=c(prob_b,1-prob_b)))) fit <- lrm(outcome~factor,data)

Previous Next | Save | Delete | Reply |

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 - 02:04:03 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 - 05: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.
*