> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of LouiseS > Sent: Thursday, March 03, 2011 5:21 AM > To: r-help@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 ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.