Displaying 4 results from an estimated 4 matches for "svyset".
2005 Oct 04
1
"Survey" package and NAMCS data... unsure of specification
...multistage probability sampling, and there are
variables included to identify the sampling units and weights. Documentation
from the NAMCS describes this for Stata as follows (note the variable names
in the data are in caps):
The pweight (PATWT), strata (CSTRATM), and PSU (CPSUM) are set with the
svyset command as
follows:
svyset pweight PATWT
svyset strata CSTRATM
svyset psu CPSUM
They provide similar instructions for SUDAAN: as
SUDAAN 1-stage WR Option
The program below provides a with replacement ultimate cluster (1-stage)
estimate of standard errors for a
cross-tabulation.
PROC CROSSTAB DATA...
2012 Aug 10
1
Direct Method Age-Adjustment to Complex Survey Data
...y, 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 replicate any of the following:
the stdize and stdweight parameters from a Stata complex survey
analysis command (like this)
svyset [w= WEIGHTVAR], psu(PSUVAR) strata(STRATAVAR) vce(linearized)
svy: mean VARNAME, stdize(agecat) stdweight(agewt)
the stdvar and stdwgt parameters from a SUDAAN proc descript call
the ESTIMATE statement in a PROC SURVEYREG (used to generate adjusted
means) in SAS version 9.2
I am...
2012 Sep 21
1
Exactly Replicating Stata's Survey Data Confidence Intervals in R
...pt for the confidence intervals,
and then displays a number of my failed attempts at hitting the numbers
right on the nose.
Thanks!!
Anthony Damico
Kaiser Family Foundation
* Stata/MP 11.2
* example stata code to replicate in R
use http://www.ats.ucla.edu/stat/stata/library/apiclus1, clear
svyset dnum [pw=pw], fpc(fpc)
gen ell0 = 1
replace ell0 = 0 if ell != 0
svy: mean ell0
* results of the final command above:
(running mean on estimation sample)
Survey: Mean estimation
Number of strata = 1 Number of obs = 183
Number of PSUs = 15 Population size...
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