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.