Re: [R] using weights in lrm

From: Frank E Harrell Jr <f.harrell_at_vanderbilt.edu>
Date: Tue 04 Jul 2006 - 22:59:31 EST

Stephan Lindner wrote:
> Dear all,
>
>
> just a quick question regarding weights in logistic regression. I do
>
>
>
> results <- lrm(y.js ~
> h.hhsize
> + h.death1
> + h.ill1
> + h.ljob1
> + h.fin1
> + h.div1
> + h.fail1
> + h.sex
> + h.ch.1
> + h.ch.5
> + h.ch.12
> + h.ch.13
> + h.popgroup
> + y.school.now
> ,x=T,y=T, data=d.caps1y, weights=weightsd, normwt=TRUE
> )
>
>
> The regression works (in the sense that the results are not way off
> the one w/o wighting the sample), but I get the following warning messages:
>
> Warning messages:
> 1: number of items to replace is not a multiple of replacement length
> 2: currently weights are ignored in model validation and bootstrapping lrm fits in: lrm(y.js ~ h.hhsize + h.death1 + h.ill1 + h.ljob1 + h.fin1 +
>
>
> Perhaps someone can help me clearifying the warning messages -- thanks
> a lot in advance !

I think the second warning is clear. Regarding the first, make sure that the weights vector has length equal to the number of rows in d.capsly. Sometimes you have to subset weights. If that's not the problem, try to create a minimal failing example and we'll work on it.

Frank Harrell

>
>
> Cheers,
>
> Stephan
>
>
>
>

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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Tue Jul 04 23:03:21 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 05 Jul 2006 - 00:16:22 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.