[R] Creating a weighted sample - Help

Nordlund, Dan (DSHS/RDA) NordlDJ at dshs.wa.gov
Thu Mar 3 20:49:04 CET 2011


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of LouiseS
> Sent: Thursday, March 03, 2011 5:21 AM
> To: r-help at r-project.org
> Subject: Re: [R] Creating a weighted sample - Help
> 
> Hi
> 
> Thanks for responses.  The sample I have taken is a random sample from
> H, I,
> J and K.  The further analysis I want to do is all around bad debt
> rates so
> it could be (H/H+I)*100 = Bad rate percentage also population stability
> calculations that are all related to credit scoring.  I want to be able
> to
> report back on any variable that I have in my data set based on my
> factored
> counts (A) of 10,000 - so every calculation is based on 10,000 account
> in
> the correct proportions.
> 
> Does his help?
> 
> Thanks once again
> Louise
> 

Louise,

It appears that you have done a stratified random sample of four types of accounts and have oversampled the less frequent account types.  You definitely should consider doing your analyses using the survey package (or similar package) that appropriately accounts for the sampling variability.  Otherwise, your variances / standard errors are going to be incorrect.

Dan

Daniel J. Nordlund
Washington State Department of Social and Health Services
Planning, Performance, and Accountability
Research and Data Analysis Division
Olympia, WA 98504-5204




More information about the R-help mailing list