similar to: Analysis of Complex Survey Data

Displaying 20 results from an estimated 1000 matches similar to: "Analysis of Complex Survey Data"

2003 Mar 24
1
APC Modelling and the GLM function
Hi all Apologies for any cross posting. I have encountered a rather bizarre "problem" in Splus and R. I am using Age-Period-Cohort models to model cervical cancer and have run the same data on both R (v.1.4.1 & v1.6.2) and Splus (version 6.0). I used the same command line in both Splus and R: glm(cases~-1+as.factor(age)
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
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) ; var1,var2,...,var6 are 6
2010 Mar 10
1
Strange result in survey package: svyvar
Hi R users, I'm using the survey package to calculate summary statistics for a large health survey (the Demographic and Health 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,
2010 Jan 30
2
convert data frame of values into correlation matrix
Hi Group, Consider a data frame like this: mylabel1 <- rep(c("A","B","C"),each=3) mylabel2 <- rep(c("A","B","C"),3) corrs <- c(1,.8,.7,.8,1,.7,.7,.7,1) myData <- data.frame(mylabel1,mylabel2,corrs) myData mylabel1 mylabel2 corrs 1 A A 1.0 2 A B 0.8 3 A C 0.7 4 B
2011 Mar 07
1
Risk differences with survey package
I'm trying to use the survey package to calculate a risk difference with confidence interval for binge drinking between sexes. Variables are X_RFBING2 (Yes, No) and SEX. Both are factors. I can get the group prevalences easily enough with result <- svyby(~X_RFBING2, ~SEX, la04.svy, svymean, na.rm = TRUE) and then extract components from the svyby object with SE() and coef() to do the
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?
2004 Sep 23
7
decompose a correlation matrix
Is there a simple way to decompose the upper triangle of a correlation matrix to a linear list; For example: X Y Z X 1 2 3 Y 2 1 4 Z 3 4 1 so you get a list like: xy 2 XZ 3 YZ 4 I suspect you can do it with a matrix transformation, but that beyond me at present. Many thanks Mark _________________________ Department of Molecular and Human Genetics, Baylor College of Medicine,
2009 May 09
2
Sweave \Sexpr{} advice please
Dear List, First off, my deepest gratitude to the Sweave developers: this tool has improved my quality greatly. A question in my work I use \Sexpr{} statements scalar values and the xtable package for all manner of tables. What I'd like to do is to use a vector inline, rather than a whole separate table. Something like: %%%%%%%%%%%%%%%% begin code % Latex junk % Sweave block:
2007 Feb 06
3
How-To construct a cov list to use a covariance matrix in factanal?
Hi, I have a set of covariance matrices but not the original data. I want to carry out some exploratory factor analysis. So, I am trying to construct a covariance matrix list as the input for factanal. I can construct a list which includes the cov, the centers, and the n.obs. But it doesn't work. I get an error that says "Error in sqrt(diag(cv)) : Non-numeric argument to mathematical
2008 Oct 09
2
vectorization instead of using loop
Dear all, I've sent this question 2 days ago and got response from Sarah. Thanks for that. But unfortunately, it did not really solve our problem. The main issue is that we want to use our own (manipulated) covariance matrix in the calculation of the mahalanobis distance. Does anyone know how to vectorize the below code instead of using a loop (which slows it down)? I'd really appreciate
2011 Oct 18
1
Repeat a loop until...
Dear all, I know there have been various questions posted over the years about loops but I'm afraid that I'm still stuck. I am using Windows XP and R 2.9.2. I am generating some data using the multivariate normal distribution (within the 'mnormt' package). [The numerical values of sanad and covmat are not important.] > datamat <-
2011 Jan 19
1
Problem in using bdh function for Govt tickers
Hi, all I wanted to fetch data from Bloomberg for govt bonds, and analyse it further. I am having trouble in getting data as when I use field=PX_LAST, it is giving the prices but when I use field=CPN, or ISSUE_DT, it is not giving the results and just bouncing back <NA> for that. This is the piece of code: > library(rJava) Warning message: package 'rJava' was built
2012 Sep 17
2
Constraint Optimization with constrOptim
Hi, I am having trouble using constrOptim. My target is to do a portfolio optimization and there some constraints have to be fulfilled. 1) The weight of each share of the portfolio has to be greater than 0 2) The sum of these weights has to be 1 I am able to fulfill either the first or the second constraint but not both. One simple way would be to fulfill the first constraint by using optim as
2004 Nov 16
5
Difference between two correlation matrices
Hi Now a more theoretical question. I have two correlation matrices - one of a set of variables under a particular condition, the other of the same set of variables under a different condition. Is there a statistical test I can use to see if these correlation matrices are "different"? Thanks Mick
1997 Apr 30
1
R-beta: ls.print
ls.print produces error that I don't seem to be able to trace. Output of the commands as follows: (hyeung is a 24x2 matrix of data) ------------------------------------------------- > summary(hyeung) x.1 x.2 Min. : 28.0 Min. : 10.0 1st Qu.: 72.0 1st Qu.: 87.5 Median : 86.5 Median : 92.5 Mean : 81.0 Mean : 82.5 3rd Qu.: 97.0 3rd Qu.:100.0 Max.
1997 Apr 30
1
R-beta: ls.print
ls.print produces error that I don't seem to be able to trace. Output of the commands as follows: (hyeung is a 24x2 matrix of data) ------------------------------------------------- > summary(hyeung) x.1 x.2 Min. : 28.0 Min. : 10.0 1st Qu.: 72.0 1st Qu.: 87.5 Median : 86.5 Median : 92.5 Mean : 81.0 Mean : 82.5 3rd Qu.: 97.0 3rd Qu.:100.0 Max.
2011 Nov 16
1
geom_bar with missing data in package ggplot
Dear all, I was hoping someone could help with a ggplot question. I would like to generate a faceted bar chart, but missing data are causing problems. g<-structure(list(Date = structure(c(11322, 11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052), class = "Date"), variable = c("Govt Revenues to GDP", "Govt Revenues to GDP",
2007 Nov 28
1
Power model in R
Um texto embutido e sem conjunto de caracteres especificado associado... Nome: n?o dispon?vel Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071128/0d193362/attachment.pl