search for: svyvar

Displaying 7 results from an estimated 7 matches for "svyvar".

Did you mean: svavar
2011 Oct 24
4
Problem with svyvar in survey package
I am facing a problem with a function in survey package. The function svyvar gives the estimated population variance from a given sampling scheme. I am working with a data having more than four continuous variables. In order to have have population total for all those cont. variables I have written in the following format svyvar(~var1+var2+var3+var4+var5+var6,data) ; var...
2010 Mar 10
1
Strange result in survey package: svyvar
...lth Survey for Honduras, 2006), and when I try to calculate the variances for several variables, I get negative numbers. I thought it may be my data, so I ran the example on the help page: data(api) ## one-stage cluster sample dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc) svyvar(~api00+enroll+api.stu+api99, dclus1) variance SE api00 11182.8 1386.4 api00 11516.3 1412.9 api.stu -4547.1 3164.9 api99 12735.2 1450.1 If I look at the full matrix for the variances (and covariances): test<-svyvar(~api00+enroll+api.stu+api99, dclus1) print(test, covarianc...
2012 Oct 16
1
Package survey: Compute standard deviations from complex survey designs
Hello, svyvar from the survey package computes variances (with standard errors) from survey design objects. Is there any way to compute standard deviations and their standard errors in a similar manner? Thanks a lot, Sebastian
2003 Jul 21
1
Analysis of Complex Survey Data
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. 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
2008 Jan 23
2
survey: estimating a covariance matrix
Hello Does anybody happen to know if it is possible to use the survey package to estimate a covariance matrix from a complex survey? I have design weights and clusters (no strata), and want to get a covariance matrix with preferably the effective sample size or else an estimate of the variance-covariance matrix of the covariance matrix ("asymptotic covariance matrix"). Is this
2008 Nov 30
1
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?
2016 Apr 30
0
Unexpected scores from weighted PCA with svyprcomp()
..."Different" here means weak correlation and different distributions. I hope the following code illustrates what I mean: ===== svycor <- function(formula, design) { # https://stat.ethz.ch/pipermail/r-help/2003-July/036645.html stopifnot(require(survey)) covariance.matrix <- svyvar(formula, design) variables <- diag(covariance.matrix) correlation.matrix <- covariance.matrix / sqrt(variables %*% t(variables)) return(correlation.matrix) } library(survey) data(api) dclus2 <- svydesign(ids = ~ dnum + snum, fpc = ~ fpc1 + fpc2, data = apiclus2) pc <- svyprcomp...