Re: [R] using survey weights for correlations

From: John Fox <jfox_at_mcmaster.ca>
Date: Sun, 30 Nov 2008 16:00:50 -0500

Dear Steve,

You can use svyvar() in the svy package to compute a covariance matrix that properly reflects the weights (and other details of the sampling design), and from this, using cov2cor(), a correlation matrix (if you want that too). You should get consistent estimates from sem() in the sem package (assuming that's what you were planning to use), but standard errors and statistical tests won't be right. You should be able to get valid inferences by bootstrapping, making proper allowance for the weights in resampling.

I hope this helps,
 John



John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox

> -----Original Message-----
> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] On
> Behalf Of Steve Powell
> Sent: November-30-08 2:41 PM
> To: R-Help
> Subject: [R] using survey weights for correlations
>
> Dear list,
> I have a data file which includes, alongside various variables representing
> questionnaire scores, a variable for survey weights computed as the number of
> observations in the sample drawn from that group divided by the number of
> observations in the population in the group. I need to calculate a covariance
> matrix of the questionnaire scores for use in sem. How do I apply the
> weights?
> Thanks in advance,
> Steve Powell
>
> www.promente.org
>
> proMENTE social research
>
> Krančevićeva 35
> 71000 Sarajevo
>
> skype stevepowell99
> mob. +387 61 215 997
> tel. +387 33 556 865
> fax. +387 33 556 866
>
> ______________________________________________
> 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.



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 Sun 30 Nov 2008 - 21:03:19 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 Sun 30 Nov 2008 - 21:30:28 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