On Tue, 22 Jul 2003 [EMAIL PROTECTED] wrote:
> Hi all I would like to perform a logistic regression analysis on some
> complex survey data with R, but am not sure if there are functions
> within R that will enable me to do so.
svyglm() in the survey package will fit generalised linear models to
complex survey data.
> Also, are there any extensions of
> the "cor" function that would enable me to incorporate survey weights
> when calculating correlation coefficients for bivariate data. Any help
> on this matter will be greatly appreciated. Many thanks in advance.
>
There's nothing built in for correlations. You can use svyvar() to get the
covariance matrix and get the correlations from that
eg
covmat<-svyvar(~var1+var2+var3, design=mysurvey)
vars<-diag(covmat)
corrmat<- covmat/sqrt(vars%*%t(vars))
What you can't get easily is standard errors for these correlations.
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
[EMAIL PROTECTED] University of Washington, Seattle
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help