similar to: Sample weights

Displaying 20 results from an estimated 7000 matches similar to: "Sample weights"

2008 Sep 12
2
Fw: Complex sampling survey _ Use of survey package
-------------------------------------------------- From: "Ahoussou Sylvie" <sylvie.ahoussou at antilles.inra.fr> Sent: Friday, September 12, 2008 9:48 AM To: "Thomas Lumley" <tlumley at u.washington.edu> Subject: Re: [R] Complex sampling survey _ Use of survey package > Thanks for your answer > > I think I made a mistake when I recopied the 5 first rows of
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
2008 Sep 11
1
Complex sampling survey _ Use of survey package
Hello everybody I don't understand how I'm supposed to use svydesign caracteristics to explain to R that my sampling design is the following one Data base = tab1 here are the five first rows of the database (nrow = 11792) num esp Quarters Totcat Totshp Totgt Tbtpos fpc1 Totanim Id_An 10 2045 G
2005 May 26
1
Survey and Stratification
Dear WizaRds, Working through sampling theory, I tried to comprehend the concept of stratification and apply it with Survey to a small example. My question is more of theoretic nature, so I apologize if this does not fully fit this board's intention, but I have come to a complete stop in my efforts and need an expert to help me along. Please help: age<-matrix(c(rep(1,5), rep(2,3),
2006 Jun 18
1
Post Stratification
Dear WizaRds, having met some of you in person in Vienna, I think even more fondly of this community and hope to continue on this route. It was great talking with you and learning from you. Thank you. I am trying to work through an artificial example in post stratification. This is my dataset: library(survey) age <- data.frame(id=1:8, stratum=rep(
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last announcement (version 3.6-11, about a year ago) the main changes are - Database-backed survey objects: the data can live in a SQLite (or other DBI-compatible) database and be loaded as needed. - Ordinal logistic regression - Support for the 'mitools' package and multiply-imputed data - Conditioning plots,
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last announcement (version 3.6-11, about a year ago) the main changes are - Database-backed survey objects: the data can live in a SQLite (or other DBI-compatible) database and be loaded as needed. - Ordinal logistic regression - Support for the 'mitools' package and multiply-imputed data - Conditioning plots,
2010 Jul 22
1
svydesign syntax
This message is for those familiar with the survey package. I need to fit a weighted Cox model to accommodate the sampling weights as I have a case-control study with controls sampled at random from a database in a ratio 2:1 to cases (whom were all sampled). I want to make sure I am using the right svydesign syntax to specify this sampling design. Can anyone please check if the statement below is
2010 Apr 07
1
Struggeling with svydesign()
Dear all, We are analysing some survey data and we are not sure if we are using the correct syntax for our design. The population of interest is a set of 4416 polygons with different sizes ranging from 0.003 to 45.6 ha, 7460 ha in total. Each polygon has a binary attribute (presence/absence) and we want to estimate the probability of presence in the population. We used sampling with replacement
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:
2005 Oct 09
1
enter a survey design in survey2.9
Hi dears, I expect that Mr Thomas Lumley will read this message. I have data from a complexe stratified survey. The population is divide in 12 regions and a region consist to and urban area and rural one. there to region just with urbain area. stratification variable is a combinaison of region and area type (urban/rural) In rural area, subdivision are sample with probabilties proporionnal to
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
2005 Jun 16
1
Survey - Cluster Sampling
Dear WizaRds, I am struggling to compute correctly a cluster sampling design. I want to do one stage clustering with different parametric changes: Let M be the total number of clusters in the population, and m the number sampled. Let N be the total of elements in the population and n the number sampled. y are the values sampled. This is my example data: clus1 <-
2012 Feb 12
1
how to extract p values in svyglm
summary(result) Call: svyglm(Injury ~ seat, sD, family = quasibinomial(link = "logit")) Survey design: svydesign(~1, prob = NULL, strata = Data[, 1], weights = Data[, 4], data = Data, fpc = ~fPc) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -4.256875 0.001421 -2996.7 <2e-16 *** seatbad 0.681504 0.001689 403.4 <2e-16 *** ---
2008 Aug 06
1
Warning when using survey:::svyglm
Howdy, Referencing the below exchange: https://stat.ethz.ch/pipermail/r-help/2006-April/103862.html I am still getting the same warning ("non-integer #successes in a binomial glm!") when using svyglm:::survey. Using the API data: library(survey) data(api) #stratified sample dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc)
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 Dec 19
1
package survey
Hi R users, could someone help me to find out which formulas, for standard error calculation, are used in following example: a=data.frame(weights=rep(c(10,1),c(4,1)),fpc=rep(41,5),uk=rep(1,5)) srs<-svydesign(id=~1, weights=~weights, data=a) srs1<-svydesign(id=~1, weights=~weights,fpc=~fpc, data=a) svytotal(~uk,srs) total SE uk 41 9 svytotal(~uk,srs1) total SE uk 41
2012 Oct 11
2
survey package question
Hello, I have got a cluster sample using an election dataset where I already had the final results of a county-specific election. I am trying to figure out what would be the best sampling design for my data. The structure of the dataset is: 1) polling station (in general schools where people vote, for a county, for example, there are 15 polling stations) 2) inside each polling station, there
2005 Oct 04
1
"Survey" package and NAMCS data... unsure of specification
Hello, all. I wanted to use the "survey" package to analyze data from the National Ambulatory Medical Care Survey, and am having some difficulty translating the analysis keywords from one package (Stata) to the other (R). The data were collected using a multistage probability sampling, and there are variables included to identify the sampling units and weights. Documentation from the
2012 Feb 13
1
survey package svystat objects from predict()
Hello, I'm running R 2.14.1 on OS X (x86_64-apple-darwin9.8.0/x86_64 (64-bit)), with version 3.28 of Thomas Lumley's survey package. I was using predict() from svyglm(). E.g.: data(api) dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, fpc=~fpc) out <- svyglm(sch.wide~ell+mobility, design=dstrat, family=quasibinomial()) pred.df <-