Re: [R] sample weights in ols

From: jour4life <jour4life_at_gmail.com>
Date: Wed, 11 May 2011 18:19:06 -0700 (PDT)

Thanks so much. I really appreciate it.

Carlos

On 5/11/2011 3:18 PM, Thomas Lumley-2 [via R] wrote:
> On Thu, May 12, 2011 at 2:43 AM, jour4life <[hidden email]
> </user/SendEmail.jtp?type=node&node=3515742&i=0>> wrote:
> > I have a follow up question. When using svyglm, it does not matter
> that I am
> > not using survey design and only weights?
> > In other words,
> >
> > fit<-svyglm(y~x1+x2+...xk,data=dataset,weights=weightvariable)
> >
> > Or am I going to have to construct a survey design variable, using
> only the
> > weight variable?
>
> You will have to construct a survey design. It's not difficult.
>
> my.first.survey.design <- svydesign(id=~1, weights=~weightvariable,
> data=dataset)
>
> fit<-svyglm(y~x1+x2+...xk, design=my.first.survey.design)
>
> -thomas
>
> --
> Thomas Lumley
> Professor of Biostatistics
> University of Auckland
>
> ______________________________________________
> [hidden email] </user/SendEmail.jtp?type=node&node=3515742&i=1>
> 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-tp3510865p3515742.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>.
>

--
View this message in context: http://r.789695.n4.nabble.com/sample-weights-in-ols-tp3510865p3516252.html
Sent from the R help mailing list archive at Nabble.com.
	[[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.
Received on Thu 12 May 2011 - 03:17:27 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 Thu 12 May 2011 - 03:50:06 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