search for: svytabl

Displaying 17 results from an estimated 17 matches for "svytabl".

Did you mean: svytable
2006 Aug 21
1
"vcov" error in svyby and svytable functions
Hi, I'm trying to compute survey svytable statistic on subsets by using the svyby function. Here is the code: b<-svyby(~V024+V751, by=~V025, design=strat2, svytable, round=TRUE) The vars, V024, V751 and V025 are factors. The by var has 2 levels, and hence there will be two subsets. strat2 is created by the svydesign function. It...
2009 Nov 02
2
"object not found" within function
Hi, I am trying to write a function to compute many cross-tabulations with the -svytable- command. Here is a simplified example of the structure of my code (adapted from the -svytable- help file): data(api) func.example<-function(variable){ dclus1<-svydesign(id=~1, weights=~pw,data=apiclus1, fpc=~fpc) svytable(~ variable, dclus1) } When I call this function with: fun...
2012 Aug 31
2
test Breslow-Day for svytable??
Hi all, I want to know how to perform the test Breslow-Day test for homogeneity of odds ratios (OR) stratified for svytable. This test is obtained with the following code: epi.2by2 (dat = daty, method = "case.control" conf.level = 0.95, units = 100, homogeneity = "breslow.day", verbose = TRUE) where "daty" is the object type table svytable consider it, but when I run the code does...
2011 Sep 14
1
svytable including NAs
Dear all I'm creating two way tables based on weighted survey data using svytable and want to include NAs as a level in the table. For unweighted data I use table(..., useNA="ifany"). Is there any equivalent for svytable? If not, is there a solution using a different function? Thanks Tim -- Tim Elwell-Sutton The University of Hong Kong Office: 3906 2053 Mob:...
2011 May 19
1
svytable and na's
hi, i am trying to work with the survey package in order to apply survey design weights. the data set i am using - ess - contains missing values. my question: when using svytable(~variable1+variable2, design=my.svydesign.object, na.rm=T) the resulting crosstable contains all missings although i defined the na's as such. any ideas??? thanks a lot, katharina ---------------------------------------------- dr. katharina manderscheid soziologisches seminar universität lu...
2007 May 18
1
svychisq
Dear All I am trying to use svychisq with a two-dimensional table 4 x 5. The command I am using is summary(svytable(~dietperception+dietstatus,dudleyls1rake,na.rm=TRUE),"C hisq") It is throwing up an error message as follows: Error in NCOL(y) : only 0's may be mixed with negative subscripts In addition: Warning messages: 1: is.na() applied to non-(list or vector) in: is.na(rowvar) 2: is.na(...
2012 May 31
1
svychisq??
...m18$M1_3_ESTRATO),ncol=1) e<-matrix(c(rep(0.078,315)),ncol=1) Muestra.comp<-svydesign(id=~b,strata =~d,nest=TRUE,weights=~c,data=am18, fpc=~e) ocupacion <-matrix(c(am18$M1_19_OCUPACIONPRINCIPALACTUAL),ncol=1) APES<-matrix(c(am18$M3_11_AUTOPERCEPCIONSALUDGENERAL),ncol=1) tbl1<-svytable(~ocupacion+APES,Muestra.comp) summary(tbl1, statistic="Chisq") Error en `[.data.frame`(design$variables, , as.character(rows)) : undefined columns selected when I call am18 at the end says it is a data.frame (to.data.frame = TRUE)) and by that I aprace error. I would...
2013 Feb 11
1
Simple frequencies using svy design
Hello, excuse me if this is trivial. I have some survey data with the following design MyDesign<-(id=ident, weights=~fwgt, fcp=~nval1+nval2, data=hh_data1) I would like to run simple frequency tables such as those provided by the freq() function of rgrs to check the impact of the sampling design on my Ns. Anyway I can do this? thanks, V [[alternative HTML version deleted]]
2012 Apr 13
2
problem with svyby and NAs (survey package)
Hello I'm trying to get the proportion "true" for dichotomous variable for various subgroups in a survey. This works fine, but obviously doesn't give proportions directly: svytable(~SurvYear+problem.vandal, seh.dsn, round=TRUE) problem.vandal SurvYear FALSE TRUE 1995 8906 786 1997 17164 2494 1998 17890 1921 1999 18322 1669 2001 17623 2122 ... Note some years are missing - they are part of the dataset, but all responses are NA (the questio...
2012 Jun 21
4
crosstable and regression for survey data (weighted)
I have survey data that I am working on. I need to make some multi-way tables and regression analyses on the data. After attaching the data, this is the code I use for tables for four variables (sweight is the weight variable): > a <- xtabs(sweight~research.area + gender + a2n2 + age) > tmp <- ftable(a) Is this correct? I don't think I need to use the strata and cluster
2003 Feb 19
5
Subpopulations in Complex Surveys
Hi, is there a way to analyze subpopulations (e.g. women over 50, those who answered "yes" to a particular question) in a survey using Survey package? Other packages (e.g. Stata, SUDAAN) do this with a subpopulation option to identify the subpopulation for which the analysis shoud be done. I did not see this option in the Survey package. Is there another way to do this?
2007 Apr 10
1
Using Sampling Weights in R
Dear List, I have a dataset that provides sampling weights (National Survey of Family Growth 2002). I want to produce a cross-tabulation and use the provided sampling weights to obtain representative population estimates. (I believe they are simply frequency weights but codebook is uninformative). I can reproduce results (using this data) that were reported in a recent journal article, if I
2012 Jun 10
1
V-Cramer in svy
Hello forum, I want to find in survey how to test V-cramer and coefficient Goodman-Kruskal gamma, to test the collinearity between varibles to enter a model. For the V-Cramer function is used with the package vcd assocstats but without considering the survey package. I appreciate the cooperation. Att. Diana Martinez [[alternative HTML version deleted]]
2004 Sep 02
1
Question on survey package
...std error would have to be computed by linearization or replication since the denominator of each percentage is an estimate. I'd also like the option of getting row, column, or total percentages. Is this possible? A colleague and I have read the manuals closely and tried many variations with svytable, svytotal with no success. Version R 1.9.1 on Windows XP TIA, Richard Valliant [[alternative HTML version deleted]]
2009 Apr 03
1
Survey Package with Binary Data (no Standard Errors reported)
Hi, I'm trying to get standard errors for some of the variables in my data frame. One of the questions on my survey is whether faculty coordinate across curriculum to include Arts Education as subject matter. All the responses are coded in zeros and ones obviously. For some of the other variables I have a 2 for those that responded with "Don't Know". I'm getting NA for
2008 Aug 18
1
Survey Design / Rake questions
...tion_ EASTBOUND 345 > WBSurvey <- subset(SurveyData, direction_ == "WESTBOUND" ) > XTTable <- xtabs(~direction_ , WBSurvey) > XTTable direction_ WESTBOUND 307 > # > EBDesign <- svydesign(id=~sampn, weights=~expwgt, data=EBSurvey) > # svytable(~lineon+lineoff, EBDesign) > OnLabels <- c( "Warner Center", "De Soto", "Pierce College", "Tampa", "Reseda", "Balboa", "Woodley", "Sepulveda", "Van Nuys", "Woodman", "Valley College&q...
2012 Aug 10
1
Direct Method Age-Adjustment to Complex Survey Data
Hi everyone, my apologies in advance if I'm overlooking something simple in this question. I am trying to use R's survey package to make a direct method age-adjustment to some complex survey data. I have played with postStratify, calibrate, rake, and simply multiplying the base weights by the correct proportions - nothing seems to hit the published numbers on the nose. I am trying to