I’m using R and I have a vector, lets just say vec <- c(1:10). I need to sample from this vector about 1000 times, however the sample size that I need to use is a noninteger, for example 3.66666. Obviously when I input this in, it rounds down to 3. What I’d like to do is take multiple samples, at the sizes of the two integers outside the noninteger number (for example 3 and 4). Hopefully, the output would give a series of samples, varying between sizes 3 and 4, but the average sample size of the 1000 samples would be 3.666666. If these could be stored in a matrix that would be ideal.
This is further complicated as I have a series of different non integer values that need to be used as a sample size, each sampled 1000 times also. These are currently stored in a vector, sample.size <- c(3.6666, 4.25, 5.3……)
Finally, each of the samples in the vector have a unique weight/probability for their sampling. In taking just 1 sample, I know you can create a vector representing the weight/probability for each value in the original value, however with this further complicated scenario, I don’t know even know where to begin with this.
I’m not entirely sure if this entire process can be done, nor do I really know where to start, but any help would be appreciated.