?? 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