On 5/10/2011 3:12 PM, Thomas Lumley-2 [via R] wrote:
> On Tue, May 10, 2011 at 2:50 PM, jour4life <[hidden email] 
> </user/SendEmail.jtp?type=node&node=3512894&i=0&by-user=t>> wrote:
>
> > Hello all,
> >
> > I am wondering if there is a way to specify sampling weights for an ols
> > model using sample weights.
> >
> > For instance, right now, my code is:
> >
> > fit.ex<-lm(y~x1+x2+x3+...xk,data=dataset,weights=weightvariable.)
> > summary(fit.ex)
> >
> > But, there is almost no difference in the coefficients nor standard 
> errors.
> > I am skeptical that I am using the option correctly since many posts 
> state
> > that the "weights" option is for weighted least squares. Or is this 
> the same
> > thing?
>
> You want svyglm() in the survey package.
>
>     -thomas
>
> -- 
> Thomas Lumley
> Professor of Biostatistics
> University of Auckland
>
> ______________________________________________
> [hidden email] 
> </user/SendEmail.jtp?type=node&node=3512894&i=1&by-user=t> 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.
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://r.789695.n4.nabble.com/sample-weights-in-ols-tp3510865p3512894.html 
>
> To unsubscribe from sample weights in ols, click here 
> <http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3510865&code=am91cjRsaWZlQGdtYWlsLmNvbXwzNTEwODY1fC0xNjIzNjcwNDM1>. 
>
Thanks very much!!

Carlos


--
View this message in context: http://r.789695.n4.nabble.com/sample-weights-in-ols-tp3510865p3512975.html
Sent from the R help mailing list archive at Nabble.com.
	[[alternative HTML version deleted]]

