similar to: Sampling with replacement

Displaying 20 results from an estimated 11000 matches similar to: "Sampling with replacement"

2010 May 11
1
functions sample() and S.SI()
Hello, I need to select a sample from a small population using simple random sampling without replacement. I've found two possibilities in R, the function sample() and the function S.SI() in the package TeachingSampling, but I don't know which one is better. Can someone help me? Thank you -- Lourdes Molera Peris M?todos Cuantitativos para la Econom?a y la Empresa Facultad de Econom?a
2012 Sep 13
5
random sampling inside a dataset
Hi all, I am wondering if do exist a function in R that allow me to sample or choose randomly the rows (i.e., samples) inside a given matrix. Thank you very much in advance. Cheers, -- Gian [[alternative HTML version deleted]]
2006 Jul 07
2
Multistage Sampling
Dear WizaRds, dear Thomas, First of all, I want to tell you how grateful I am for all your support. I wish I will be able to help others along one day the same way you do. Thank you so much. I am struggling with a multistage sampling design: library(survey) multi3 <- data.frame(cluster=c(1,1,1,1 ,2,2,2, 3,3), id=c(1,2,3,4, 1,2,3, 1,2), nl=c(4,4,4,4, 3,3,3, 2,2), Nl=c(100,100,100,100,
2011 Nov 28
9
CSS Problem.
Hi Everyone, I was going through the Rails tutorial from here: http://ruby.railstutorial.org/chapters/filling-in-the-layout#top I was getting this exception on my WebRick server: Started GET "/assets/blueprint/print.css" for 127.0.0.1 at 2011-11-28 14:43:00 +0530 Served asset /blueprint/print.css - 404 Not Found (0ms) ActionController::RoutingError (No route matches [GET]
2011 Dec 02
20
Need Some Guides on Solr with Rails.
Hi Everyone, I am pretty new to Rails. I have very little idea about everything. But for my new project i have been asked to do some research on Solr search and implement it on Rails. Please provide me some link on tutorials and guides about Solr on Rails. Trouble is... have to do it by tomorrow. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are
2014 Sep 17
2
Generating unordered, with replacement, samples
Hello, I am trying to interface in my teaching some elementary probability with Monte Carlo ideas. In sampling from a finite population, the number of distinct samples of size 'k' from a population of size 'n' , when individuals are selected with replacement and the selection order does not matter, is choose(n + k -1, k). Does anyone have a suggestion about how to simulate
2017 Oct 18
0
uniform sampling without replacement algorithm
Splus used a similar method for sampling from "bigdata" objects. One problem was that sample() is used both for creating a sample and for scrambling the order of a vector. Scrambling the order of a big vector wastes time. It would be nice to be able to tell sample() that we don't care about the order. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Oct 17, 2017 at 10:55
2009 Jun 25
2
random sampling or random replacement
Dear R users, I'm trying to randomly recreate a real dataset with missing data and I'm not quite sure if I can use the sample command for this. I think it might be better to do it in 2 steps and randomly replace the sampled data with missing data... So something like this x <- sample(10000:20000, 100) #without replacement Now I want x to contain to 20% missing data (NA). Could
2017 Oct 17
4
uniform sampling without replacement algorithm
Let us consider the current uniform sampling without replacement algorithm. It resides in function do_sample in https://svn.r-project.org/R/trunk/src/main/random.c Its complexity is obviously O(n), where the sample is selected from 1...n, since the algorithm has to create a vector of length n. So when the sample size is much lesser than n, the algorithm is not effective. Algorithms with
2011 Nov 25
4
Sprockets File not Found Exception.
Hi Everyone, I was trying out some sample applications for Rails. I created some controllers and pages. But when i try to access one of them i get an exception on the webpage: --------------------------------------------------------------------- Sprockets::FileNotFound in Pages#home Showing c:/railscode/test_app/app/views/layouts/application.html.erb where line #6 raised: couldn''t
2012 Mar 28
6
How to get all possible combinations?
Dear all, suppose I have a vector with elements as: Vec <- c(2,3,4,5,6) Now I want to have all possible combination of length 3 using those elements and without any repetition. Like, I want to have 1 possibility like 2-3-4 but not 3-2-4. Can somebody guide me how to achieve that in R? Thanks for your help.
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 <-
2011 Apr 08
3
random sampling with levels and with replacement
Dear all, i have a dataset of about 400 records , with a variable that has  two levels 40 bad and 360 good among other variables,how do i come up  with10 random samples that have the composition of as the main sample  but maintaining the 40 bad 360 good with replacement, i recently discovered that my random samples generated dont maintain the ratio. My code is as  : mysample <-
2017 Oct 18
1
uniform sampling without replacement algorithm
> From: "Pavel S. Ruzankin" <ruzankin at math.nsc.ru> > Let us consider the current uniform sampling without replacement > algorithm. It resides in function do_sample in > https://svn.r-project.org/R/trunk/src/main/random.c > Its complexity is obviously O(n), where the sample is selected from > 1...n, since the algorithm has to create a vector of length n. So
2011 Mar 10
3
Fw: random sampling steps in R with replacement
Please note is with replacement From: taby gathoni <tabieg@yahoo.com> To: R help <r-help@r-project.org> Sent: Thursday, March 10, 2011 11:53 AM Subject: [R] random sampling steps in R Dear all, Could someone assist me in random sampling steps/code in R? I have a main sample of 42 males and 165 females and I want to come up with about 1000 samples of 20 males and 20 females from
2001 Nov 20
3
Sampling from a population
Hi ALL: Suppose you have a population of N <- 5 observations, x <- c(43, 28, 7, 61, 39). From that you can draw a maximum of 10 samples without replacement of size n <- 3. (Command choose(N,n) yields 10). For instance the samples I seek are 43, 61, 7 39, 7, 28 ...etc How can I get R to do that for me, to get an exhaustive list of samples of size n drawn without replacement
2010 Jan 19
1
Sampling theory
Hi there, are there any R-packages for computations required in sampling theury (such as confidence intervals under random, stratified, cluster sampling; I'd be partoculary interested in confidence intervals for the population variance, which is difficult enough to find even in books)? Thanks, Christian *** --- *** Christian Hennig University College London, Department of Statistical
2012 Jun 14
1
Question about sampling
Dear list I wish to extract from a population genotypized for 10 SNP a subsample of the same population of size n with similar allele frequencies. Essentially i have a matrix of 200 rows (df) like this Name,Condition,rs1385699_X,rs6625163_X,rs962458_X,Rs4658627_1, sample01,Case,1,1,1,-1 sample02,Control,1,1,1,1 sample06,Control,1,-1,1,0 sample10,Case,1,1,1,0 sample11,Control,1,1,1,1
2003 Feb 13
2
error from sample if sampling length one character (PR#2546)
Full_Name: Patrick Burns Version: 1.6.1 OS: Suse Linux Submission from: (NULL) (217.36.14.68) Sample gives an error if it is sampling a length one character vector: > sample('a', 1) Error in sample(x, size, replace, prob) : invalid first argument The fix is trivial (numeric test in first line of the body): function (x, size, replace = FALSE, prob = NULL) { if (length(x) == 1
2012 Sep 25
1
Three Stage Sampling of categorical variable using 'survey' in R
For a sanitation project in Bangladesh I need to design a three stage sample survey to be representative of around 40 million people. I find myself suddenly with several challenges with which I struggle and would be gratefully for any help. As the questions are linked I kept them together rather than creating multiple posts 1) SURVEY DESIGN So far I designed mainly two stage cluster surveys but