search for: mydesign

Displaying 5 results from an estimated 5 matches for "mydesign".

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
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 Oct 12
0
goodness of fit for logistic regression with survey package
...exploratory analyses on a complex survey data by using survey package. Could you help me how to see the goodness of fit for the model below? Should I use AIC, BIC, ROC, or what? What code would let me run a goodness of fit test for the model? Here are my codes: #incorporating design effects# > mydesign <- svydesign(id=~clust, strata=~strat, weights=~sweight, > data=mydata) #logistic regression model# > model1 <- svyglm(y ~ x1 + x2+ x3 + x4 + x5, design = mydesign, > data=(mydata),family=quasibinomial()) #I tried loglik function, but didn't work# > logLik(model1) [1] 8753.057...
2012 Jun 12
2
GEE with Inverse Probability Weights
Greetings, I have a very, very, simple research question. I want to predict one dichotomous variable using another dichotomous variable. Straightforward, right? The issue is that the dataset has two issues causing some complications for me. 1) The subjects are not independent -- they are sibling pairs. Every person in the dataset has a sibling in the dataset. This needs to be treated a
2010 Aug 25
1
Surprising behaviour survey-package with missing values
...ssing values. Some example code demonstrating the behaviour is included below. I have a stratified sampling design where I want to estimate the total income. In some strata some of the incomes are missing. I want to ignore these missing incomes. I would have expected that svytotal(~income, design=mydesign, na.rm=TRUE) would do the trick. However, when calculating the estimates 'by hand' the estimates were different from those obtained from svytotal. The estimated mean incomes do agree with each other. It seems that using the na.rm option with svytotal is the same as replacing the missing val...