Re: [R] logistic regreesion and score test

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Fri, 04 Jul 2008 17:23:09 -0500

刘杰 wrote:
> Hi guys,
>
> Here I have a dataset with 800 positive samples and 800 negative ones
> looking like this
>
> y x1 x2
> 1 0 1
> -1 1 1
> ......
> I want to build a logistic regression model with y as the dependent
> variable, x1 and x2 as the independent variables (logit(y)=b0+ b1*x1
> +b2*x2.). Then I want to compare this model with the NULL model which is
> b1=0 and b2=0 using a score test. With the P value I get from score test, I
> can then tell whether the two independent variables are significant related
> with y.
>
> Does anyone know how to do that in R? Which function should I use? Many many
> thanks,
>
> --Jerry

Score tests are good but so are likelihood ratio tests and sometimes Wald tests. The latter two are easy to do with glm or the lrm and anova functions in the Design package.

Frank

>
> [[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.
>

-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University

______________________________________________
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 Fri 04 Jul 2008 - 22:30:01 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 Sat 05 Jul 2008 - 01:31:26 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