Displaying 17 results from an estimated 17 matches for "svrepdesign".
2004 Apr 19
1
specifying as.svrepdesign with odd number PSUs
Is there a way to create a BRR svrepdesign from a survey design when the number of PSUs is odd in one or more stratum? Creating a JKn svrepdesign with that condition works okay, but when I tried to create a svrepdesign with type="BRR" I get an error and this message:
"Can't split with odd numbers of PSUs in a stra...
2009 Oct 23
2
Memory Problems with CSV and Survey Objects
...Here are the commands:
> library(survey)
#this step takes more than five minutes
> data08<-read.csv("data08.csv",header=TRUE,nrows=210437)
> object.size(data08)
#329877112 bytes
#Looking at Windows Task Manager, Mem Usage for Rgui.exe is already 659,632K
> brr.dsgn <-svrepdesign( data = data08 , repweights = data08[, grep(
"^repwgt" , colnames( data08)) ], type = "BRR" , combined.weights = TRUE ,
weights = data08$mainwgt )
#Error: cannot allocate vector of size 254.5 Mb
#The survey design object does not get created.
#This also causes Windows Task Man...
2007 Sep 20
2
Package Survey
Hello,
How I use the function as.svrepdesign without memory.size problems?
desenho_npc_JK <- as.svrepdesign(desenho_npc,type="JKn")
Error: cannot allocate vector of size 161.3 Mb
In addition: Warning messages:
1: Reached total allocation of 1022Mb: see help(memory.size)
2: Reached total allocation of 1022Mb: see help(mem...
2011 Jul 27
1
Inserting weights in ltm package
...analyses using the ltm package, however, I am
using large scale survey data which requires weighting for accurate
results. I attempted to create a weighted object to insert into the
formulae of the ltm packages, however, the survey data only includes
30 replicate weights and a sampling weight. The svrepdesign requires
additional information such as jacknife weights in an external object
(for scale, rscale), however, I do not have these. I typically just
use the sampling weight when doing analyses in other platforms such as
MPlus, however there does not appear to a way of referring to this
directly in t...
2012 Sep 26
2
Retrieve regression summary results after rq
Hi all,
I am using quantile regression with svy design. I want to retrieve
summary regression statistics (std error, p-value), since I don't have
any in my output:
Commands:
clus1_d<- svydesign(id=~cd002_co, weights=~wtper, strata=~str, data=data)
bclus1<-as.svrepdesign(clus1_d,type="bootstrap",replicates=100)
fit1<- withReplicates(bclus1,quote(coef(rq(newm428b~sch_new_2+sch_new_3+sch_new_4,
tau=c(0.05,0.25,0.5,0.75,0.95),weights=wtper))))
Output:
coefficients(fit1)
tau= 0.05 tau= 0.25 tau= 0.50 tau= 0.75 tau= 0.95
(Intercept) 2...
2016 Apr 04
2
Using final sample weight in survey package
...rate the design with
svydesign and create some bootstrap replicates in order to be able to
produce estimations.
Is that correct?:
load(url("http://knutur.at/wsmt/R/RData/small.RData"))
library(survey)
small.w <- svydesign(ids = ~1, data = small, weights = small$weight)
design<-as.svrepdesign(small.w,type="bootstrap", replicates=100)
Cordialmente
Jose F. Zea
[[alternative HTML version deleted]]
2010 Mar 26
1
return.replicates in survey pkg
How do I retrieve the replicates estimates from a crosstab done using
svyby?
Here is an example from the help page for svyby in the package:
> data(api)
> dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
> rclus1<-as.svrepdesign(dclus1)
>
> a <- svyby(~api99, ~stype, rclus1, svymean, return.replicates=TRUE)
> a$replicates
NULL
But, compare to
> b <- svymean(~api99, design=rclus1, return.replicates=TRUE)
> b$replicates
[1] 606.8488 611.5866 609.1989 605.5765 608.1381 606.6927 609.8101
599.4371 602.43...
2011 Jan 26
1
Quantile regression (rq) and complex samples
I am new to R and am interested in using the program to fit quantile
regression models to data collected from a multi-stage probability
sample of the US population. The quantile regression package, rq, can
accommodate person weights. However, it is not clear to me that
boot.rq is appropriate for use with multi-stage samples (i.e., is
capable of sampling primary sampling units instead of survey
2017 Jul 05
2
Svyglm Error
...is a minimal reproducible example:
library(RCurl)
library(survey)
data <- getURL("https://raw.githubusercontent.com/cbenjamin1821/careertech-ed/master/elsq1adj.csv")
elsq1ch <- read.csv(text = data)
#Specifying the svyrepdesign object which applies the BRR weights
elsq1ch_brr<-svrepdesign(variables = elsq1ch[,1:16], repweights = elsq1ch[,18:217], weights = elsq1ch[,17], combined.weights = TRUE, type = "BRR")
elsq1ch_brr
##Resetting baseline levels for predictors
elsq1ch_brr <- update( elsq1ch_brr , F1HIMATH = relevel(F1HIMATH,"PreAlg or Less") )
elsq1ch_brr &...
2016 Apr 04
0
Using final sample weight in survey package
...some bootstrap replicates in order to be able to
> produce estimations.
>
> Is that correct?:
>
>
> load(url("http://knutur.at/wsmt/R/RData/small.RData"))
> library(survey)
> small.w <- svydesign(ids = ~1, data = small, weights = small$weight)
> design<-as.svrepdesign(small.w,type="bootstrap", replicates=100)
>
>
>
> Cordialmente
> Jose F. Zea
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https:...
2017 Jul 05
0
Svyglm Error
...rary(RCurl)
> library(survey)
>
> data <- getURL("https://raw.githubusercontent.com/
> cbenjamin1821/careertech-ed/master/elsq1adj.csv")
> elsq1ch <- read.csv(text = data)
>
> #Specifying the svyrepdesign object which applies the BRR weights
> elsq1ch_brr<-svrepdesign(variables = elsq1ch[,1:16], repweights =
> elsq1ch[,18:217], weights = elsq1ch[,17], combined.weights = TRUE, type =
> "BRR")
> elsq1ch_brr
>
> ##Resetting baseline levels for predictors
> elsq1ch_brr <- update( elsq1ch_brr , F1HIMATH = relevel(F1HIMATH,"PreAlg
&...
2011 Jul 12
1
Question re complex survey design and cure models
Hello all,
I am using AddHealth data to fit a cure, aka split population model using nltm. I am not sure how to account for the complex survey design - does anyone have any suggestions? Any help would be greatly appreciated!
Sincerely,
Sam
2006 Jul 18
1
Survey-weighted ordered logistic regression
Hi,
I am trying to fit a model with an ordered response variable (3 levels) and
13 predictor variables. The sample has complex survey design and I've used
'svydesign' command from the survey package to specify the sampling design.
After reading the manual of 'svyglm' command, I've found that you can fit a
logistic regression (binary response variable) by specifying the
2012 May 11
1
Replicate weights in R?
Hello everyone! I am analyzing a public use dataset which has both basic
weights and replicated weights. I have found that only Stata seems to work
with replicate weights but I would rather use R. Does anyone know if R can
use replicate weights?
If this is possible, could someone share some links and/or code for
performing this action. Thank you for your time.
Samantha Tornello, M.A.
University
2007 Sep 06
3
Survey package
Good afternoon!
I'm trying to use the Survey package for a stratified sample which has 4 criteria on which the stratification is based. I would like to get the corrected weights and for every element i get a weight of 1
E.g: tipping
design <- svydesign (id=~1, strata= ~regiune + size_loc + age_rec_hhh + size_hh, data= tabel)
and then weights(design)
gives
2006 Apr 11
4
Bootstrap and Jackknife Bias using Survey Package
Dear R users,
I?m student of Master in Statistic and Data analysis, in New University of Lisbon. And now i?m writting my dissertation in variance estimation.So i?m using Survey Package to compute the principal estimators and theirs variances.
My data is from Incoming and Expendire Survey. This is stratified Multi-stage Survey care out by National Statistic Institute of Mozambique. My domain of
2011 Aug 18
1
Comparison of means in survey package
Dear list colleagues,
I'm trying to come up with a test question for undergraduates to illustrate comparison of means from a complex survey design. The data for the example looks roughly like this:
mytest<-data.frame(harper=rnorm(500, mean=60, sd=1), party=sample(c("BQ", "NDP", "Conservative", "Liberal", "None", NA), size=500,