Displaying 20 results from an estimated 2000 matches similar to: "survey weights"
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
2018 Mar 22
1
exporting data to stata
On Thu, Mar 22, 2018 at 4:52 AM, Raja, Dr. Edwin Amalraj
<amalraj.raja at abdn.ac.uk> wrote:
> Hi ,
>
> library(foreign)
> write.dta(data1, "data1.dta")
>
> should work.
I don't think so:
> library(foreign)
> example(svydesign)
> write.dta(dstrat, "~/Downloads/foo.dta")
Error in write.dta(dstrat, "~/Downloads/foo.dta") :
The
2018 Mar 22
0
exporting data to stata
Hi ,
library(foreign)
write.dta(data1, "data1.dta")
should work. The file will be saved in the working directory.
Use
getwd()
to know the working directory.
Best wishes
Amalraj Raja
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of rosario scandurra
Sent: 22 March 2018 07:47
To: r-help at r-project.org
Subject: [R] exporting data to stata
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
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),
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
2018 Mar 22
3
exporting data to stata
Hi,
I am new to R and I want to export data into Stata. Could somebody help with that? Thanks a lot.
This is the code I am using:
> setwd("D:/datasets/Seg-bcn/ESBD")
> data1 <- readRDS("r17045_ESDB_Habitatges_BDD_V_1_0.rds")
> library(foreign)
> write.dta(data="data1", file = "D:/datasets/data1.dta")
Error in write.dta(data =
2016 Apr 04
2
Using final sample weight in survey package
I have the final sample weight (expansion factor) from a socieconomic
survey. I don't know the exact design used in the study ( (probably is a
stratified two-stage design).
To illustrate my problem I will use the next dataset which have a sample
weight (but the design is not specified) and incorporate the design with
svydesign and create some bootstrap replicates in order to be able to
2011 Sep 30
1
Advice on approach to weighting survey
I'm about to add weights to a bus on-board survey dataset with ~150 variables and ~28,000 records. My intention is to weight (for each bus "run") by boarding stop and alighting stop. I've seen the Rake function of the Survey package, but it seems that converting to a "svydesign" might be excessive for my purpose.
My dataset has a huge number of unique
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 <-
2003 Feb 12
2
Various Errors using Survey Package
Hi,
I have been experimenting with the new Survey package. Specifically, I was
trying to use some of the functions on the public-use survey data from NHIS
(2000 Sample Adult file).
Error 1): The first error I get is when I try to specify the complex survey
design.
nhis.design<-svydesign(ids=~psu, probs=~probs, strata=~strata, data=nhis.df,
check.strata=TRUE)
Error in svydesign(ids =
2012 Sep 21
1
Exactly Replicating Stata's Survey Data Confidence Intervals in R
Hi everyone, apologies if the answer to this is in an obvious place. I've
been searching for about a day and haven't found anything..
I'm trying to replicate Stata's confidence intervals in R with the survey
package, and the numbers are very very close but not exact. My ultimate
goal is to replicate Berkeley's SDA website with R (http://sda.berkeley.edu/),
which seems to
2018 Mar 06
4
Capturing warning within user-defined function
Hi, I am trying to automate the creation of tables for some simply
analyses. There are lots and lots of tables, thus the creation of a
user-defined function to make and output them to excel.
My problem is that some of the analyses have convergence issues, which I
want captured and included in the output so the folks looking at them know
how to view those estimates.
I am successfully able to do
2016 Apr 04
0
Using final sample weight in survey package
hi, probably not.. if your survey dataset has a complex design (like
clusters/strata), you need to include them in the `svydesign` call.
coercing an incorrect survey design into a replicate-weighted design will
not fix the problem of failing to account for the sampling strategy
On Mon, Apr 4, 2016 at 12:01 AM, Jos? Fernando Zea <jfzeac at gmail.com> wrote:
> I have the final sample
2012 May 14
1
Post stratification weights in survey package in R
Hi all,
I have data collected from a survey administered on a subset of the
population. I also have the population proportions of variables such as
gender, race and housing type. I would like to combine the weights from
each separate cross tab (of gender, race and housing type) such that the
weighted proportions of my survey data matches that of the population.
I have tried the following:
2007 Sep 06
1
the survey package
Good afternoon!
I'm trying to use the survey package to get a better point of view for my data, but i need some piece of advice:
i have some data from a survey which has been stratified using 2 criteria: region(7 values), size of locality(5 values) Using the survey pakage how can i define in a correct way this design (taking into account all 4 strata not just one as in the Survey
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
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
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